From 3784ae54c0258877e6220e97584811de03adbf5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Wed, 25 Mar 2026 15:28:53 +0100 Subject: [PATCH 1/9] Preparation for release 6.4.0. --- README.md | 25 +- pom.xml | 2 +- src/main/java/com/infobip/RequestFactory.java | 2 +- src/main/java/com/infobip/api/CallsApi.java | 38 +- src/main/java/com/infobip/api/EmailApi.java | 42 +- src/main/java/com/infobip/api/NumbersApi.java | 4240 +++++++++++++ .../java/com/infobip/api/ResourcesApi.java | 1169 ++++ .../java/com/infobip/api/WhatsAppApi.java | 660 ++ .../model/CallRecordingFailedProperties.java | 68 +- .../model/CallRoutingEndpointType.java | 4 +- .../infobip/model/CallRoutingSipEndpoint.java | 39 +- .../java/com/infobip/model/CallVoice.java | 766 +-- .../java/com/infobip/model/CallsAddress.java | 501 ++ .../model/CallsClickToCallMessage.java | 6 +- .../java/com/infobip/model/CallsCnam.java | 127 + .../com/infobip/model/CallsCnamDelivery.java | 100 + .../model/CallsCnamDeliveryStatus.java | 137 + .../com/infobip/model/CallsCnamStorage.java | 152 + .../infobip/model/CallsCnamStorageStatus.java | 137 + .../infobip/model/CallsDialogPlayRequest.java | 6 + .../model/CallsDialogRecordingPage.java | 10 +- .../model/CallsDialogRecordingResponse.java | 405 -- .../com/infobip/model/CallsDirection.java | 49 + .../infobip/model/CallsEmergencyAddress.java | 149 + .../model/CallsEmergencyAddressStatus.java | 91 + .../java/com/infobip/model/CallsLanguage.java | 56 +- .../com/infobip/model/CallsPlayContent.java | 1 + .../infobip/model/CallsPlayContentType.java | 3 +- .../java/com/infobip/model/CallsPlayTty.java | 189 + .../infobip/model/CallsPlayTtyOptions.java | 100 + .../infobip/model/CallsPublicCnamStatus.java | 128 + .../model/CallsRecordingFailedProperties.java | 70 +- ...TrunkRegisteredResetPasswordResponse.java} | 35 +- .../CallsSipTrunkResetPasswordResponse.java | 87 + .../com/infobip/model/CallsSipTrunkType.java | 3 +- .../infobip/model/CallsSynthesisVoice.java | 76 +- .../infobip/model/CallsTtyPlayContent.java | 116 + .../infobip/model/CallsUrlPlayContent.java | 42 +- .../model/CallsValidateAddressResponse.java | 119 + .../model/GetResourceRequest200Response.java | 21 + .../model/MessagesApiInboundDlrChannel.java | 8 +- ...essagesApiInboundTypingStartedChannel.java | 47 + .../MessagesApiInboundTypingStartedEvent.java | 8 +- ...ssagesApiInboundTypingStoppedChannel.java} | 8 +- .../MessagesApiInboundTypingStoppedEvent.java | 8 +- .../model/MessagesApiOutboundEvent.java | 1 + .../model/MessagesApiOutboundEventType.java | 3 +- .../model/MessagesApiOutboundSeenEvent.java | 322 + ... MessagesApiOutboundSeenEventChannel.java} | 10 +- ...MessagesApiOutboundTypingStartedEvent.java | 8 +- ...sApiOutboundTypingStartedEventChannel.java | 49 + ...MessagesApiOutboundTypingStoppedEvent.java | 8 +- ...sApiOutboundTypingStoppedEventChannel.java | 47 + .../java/com/infobip/model/MoActionType.java | 77 + .../java/com/infobip/model/NumberType.java | 59 + .../com/infobip/model/NumbersAddress.java | 256 + .../model/NumbersAegisVetImportRequest.java | 169 + .../com/infobip/model/NumbersAppealData.java | 147 + .../infobip/model/NumbersAppealRequest.java | 106 + .../model/NumbersAttachNumberPoolRequest.java | 146 + .../java/com/infobip/model/NumbersBrand.java | 466 ++ .../NumbersBrandAuthUpdateWebhookContent.java | 184 + .../NumbersBrandAuthUpdateWebhookMessage.java | 256 + ...NumbersBrandAuthUpdateWebhookResponse.java | 120 + .../infobip/model/NumbersBrandPreview.java | 192 + .../infobip/model/NumbersBrandRegistrar.java | 46 + .../NumbersBrandRegistrationStatusPublic.java | 49 + ...umbersBrandRegistrationWebhookContent.java | 204 + ...umbersBrandRegistrationWebhookMessage.java | 256 + ...mbersBrandRegistrationWebhookResponse.java | 120 + .../com/infobip/model/NumbersBrandStage.java | 47 + .../com/infobip/model/NumbersBrandStatus.java | 340 ++ .../com/infobip/model/NumbersBrandType.java | 49 + .../com/infobip/model/NumbersBrandVet.java | 450 ++ .../infobip/model/NumbersBrandVetStatus.java | 48 + .../NumbersBrandVetStatusWebhookContent.java | 268 + .../NumbersBrandVetStatusWebhookMessage.java | 256 + .../NumbersBrandVetStatusWebhookResponse.java | 120 + .../model/NumbersBrandWebhookPlatform.java | 146 + .../model/NumbersBusinessIdentifier.java | 126 + .../model/NumbersBusinessIdentifierType.java | 48 + .../NumbersBusinessRegistrationType.java | 63 + .../com/infobip/model/NumbersCampaign.java | 541 ++ ...mbersCampaignAiFeedbackWebhookContent.java | 104 + ...mbersCampaignAiFeedbackWebhookMessage.java | 256 + ...bersCampaignAiFeedbackWebhookResponse.java | 121 + .../model/NumbersCampaignFeedback.java | 229 + ...rsCampaignNetworkStatusWebhookContent.java | 178 + ...rsCampaignNetworkStatusWebhookMessage.java | 256 + ...sCampaignNetworkStatusWebhookResponse.java | 122 + .../model/NumbersCampaignRegistrar.java | 55 + .../infobip/model/NumbersCampaignStage.java | 64 + .../NumbersCampaignStatusWebhookContent.java | 298 + .../NumbersCampaignStatusWebhookMessage.java | 256 + .../NumbersCampaignStatusWebhookResponse.java | 120 + .../infobip/model/NumbersCampaignType.java | 52 + .../model/NumbersCampaignWebhookPlatform.java | 146 + .../model/NumbersCvVetImportRequest.java | 116 + ...ersDataUniversalNumberingSystemNumber.java | 117 + .../model/NumbersDocumentMetadata.java | 239 + .../model/NumbersDownloadResponseModel.java | 192 + .../infobip/model/NumbersEditPermissions.java | 146 + .../NumbersExternalAutomaticReviewError.java | 239 + ...NumbersExternalAutomaticReviewResults.java | 159 + .../NumbersExternalAutomaticReviewStatus.java | 48 + .../model/NumbersExternalTenDlcCampaign.java | 345 ++ .../NumbersForwardToCallRoutingDetails.java | 110 + .../NumbersForwardToIvrActionDetails.java | 116 + .../NumbersForwardToPstnActionDetails.java | 107 + .../NumbersForwardToSubscriptionDetails.java | 112 + ...lobalIntermediaryIdentificationNumber.java | 117 + .../infobip/model/NumbersGovernmentBrand.java | 692 +++ .../NumbersInteractiveVoiceResponseOptIn.java | 107 + .../infobip/model/NumbersKeywordOptIn.java | 179 + .../model/NumbersLegalEntityIdentifier.java | 116 + .../com/infobip/model/NumbersMessageType.java | 47 + .../com/infobip/model/NumbersNetwork.java | 52 + .../infobip/model/NumbersNetworkState.java | 49 + .../infobip/model/NumbersNetworkStatus.java | 266 + .../infobip/model/NumbersNonProfitBrand.java | 739 +++ .../model/NumbersNumberCapabilityType.java | 50 + .../NumbersNumberConfigurationModel.java | 137 + .../com/infobip/model/NumbersNumberPool.java | 257 + .../model/NumbersNumberPoolAvailability.java | 47 + .../model/NumbersNumberPoolStatus.java | 49 + .../infobip/model/NumbersNumberPoolType.java | 47 + ...NumbersNumberPoolUsageApiPageResponse.java | 157 + .../NumbersNumberPoolUsageApiResponse.java | 192 + .../infobip/model/NumbersNumberPreview.java | 192 + .../infobip/model/NumbersNumberPreviews.java | 107 + .../com/infobip/model/NumbersNumberPrice.java | 238 + .../infobip/model/NumbersNumberResponse.java | 844 +++ .../java/com/infobip/model/NumbersOptIns.java | 202 + .../model/NumbersPageResponseBrand.java | 156 + .../model/NumbersPageResponseBrandVet.java | 156 + .../model/NumbersPageResponseCampaign.java | 156 + .../com/infobip/model/NumbersPolicyType.java | 48 + .../com/infobip/model/NumbersPriority.java | 221 + .../infobip/model/NumbersPriorityInfo.java | 148 + .../model/NumbersPriorityTimeData.java | 137 + .../model/NumbersPriorityTimeUnit.java | 47 + .../infobip/model/NumbersPriorityType.java | 48 + .../model/NumbersPrivateCompanyBrand.java | 692 +++ .../model/NumbersPublicCompanyBrand.java | 842 +++ .../infobip/model/NumbersRecordingBody.java | 100 + .../model/NumbersRegisterCampaignRequest.java | 101 + .../infobip/model/NumbersRejectionReason.java | 192 + .../model/NumbersRejectionReasonPayload.java | 146 + .../model/NumbersReservationStatus.java | 49 + .../com/infobip/model/NumbersResponse.java | 144 + .../NumbersReviewSubmissionResponse.java | 101 + .../com/infobip/model/NumbersReviewType.java | 48 + .../infobip/model/NumbersStatusResponse.java | 137 + .../infobip/model/NumbersStockExchange.java | 71 + .../model/NumbersTenDlcAiReviewRequest.java | 571 ++ .../infobip/model/NumbersTenDlcCampaign.java | 1430 +++++ .../infobip/model/NumbersTenDlcUseCase.java | 56 + .../infobip/model/NumbersTollFreeBrand.java | 758 +++ .../model/NumbersTollFreeCampaign.java | 941 +++ .../model/NumbersTollFreeMessageVolume.java | 56 + ...TollFreeUnifiedNumberCampaignApiModel.java | 2122 +++++++ .../infobip/model/NumbersTollFreeUseCase.java | 90 + ...bersUpdateCampaignRegistrationRequest.java | 183 + .../NumbersUpdateOwnedNumberRequest.java | 152 + .../com/infobip/model/NumbersVerbalOptIn.java | 106 + .../com/infobip/model/NumbersVertical.java | 68 + .../model/NumbersVetImportRequest.java | 91 + .../infobip/model/NumbersVettingProvider.java | 48 + .../com/infobip/model/NumbersVettingType.java | 48 + .../model/NumbersVoiceActionDetails.java | 141 + .../NumbersVoiceForwardToAnswersDetails.java | 63 + ...ersVoiceForwardToConversationsDetails.java | 63 + ...umbersVoiceNumberMaskingActionDetails.java | 120 + .../com/infobip/model/NumbersVoiceSetup.java | 189 + .../com/infobip/model/NumbersWebOptIn.java | 143 + ...NumbersWebhookBrandRegistrationStatus.java | 49 + .../model/NumbersWebhookBrandVetStatus.java | 47 + .../model/NumbersWebhookBrandVettingType.java | 47 + .../NumbersWebhookCampaignNetworkStatus.java | 46 + .../model/NumbersWebhookCampaignStage.java | 50 + .../model/NumbersWmcVetImportRequest.java | 116 + .../infobip/model/RcsConversationInfo.java | 152 + .../model/RcsConversationStartedEvent.java | 272 + .../RcsConversationStartedEventContent.java | 97 + .../RcsConversationStartedEventType.java | 47 + .../model/RcsConversationStartedEvents.java | 231 + .../model/RcsConversationStartedInfo.java | 254 + .../infobip/model/RcsConversationType.java | 47 + .../model/RcsEventInteractionType.java | 46 + ...EventContent.java => RcsInboundEvent.java} | 295 +- .../com/infobip/model/RcsInboundEvents.java | 10 +- ...ageContent.java => RcsInboundMessage.java} | 349 +- .../com/infobip/model/RcsInboundMessages.java | 10 +- .../model/RcsMessageInteractionType.java | 49 + .../com/infobip/model/RcsMessagePrice.java | 183 + .../com/infobip/model/RcsPlatformInfo.java | 146 + .../com/infobip/model/RcsTrafficType.java | 51 + .../model/RcsWebhookDeliveryReport.java | 330 +- .../model/ResourcesAlphaCoverageInfo.java | 288 + .../model/ResourcesAlphaCoverageKey.java | 169 + ...cesAlphaRequirementSpecsRequestApiDoc.java | 267 + .../model/ResourcesAlphaResourceFilter.java | 157 + .../model/ResourcesAlphaResourceInfo.java | 294 + .../ResourcesAlphaResourceOrderApiDoc.java | 774 +++ ...ourcesAlphaResourceOrderRequestApiDoc.java | 501 ++ .../ResourcesAlphaWebhookNotifApiDoc.java | 346 ++ .../model/ResourcesAppleCoverageInfo.java | 328 + .../model/ResourcesAppleCoverageKey.java | 215 + .../model/ResourcesAppleMbMoActionDocs.java | 87 + ...esourcesAppleMbMoConfigurationRequest.java | 269 + .../ResourcesAppleMbMoHttpForwardDocs.java | 163 + .../model/ResourcesAppleResourceFilter.java | 110 + .../model/ResourcesAppleResourceInfo.java | 340 ++ .../infobip/model/ResourcesAttachment.java | 137 + .../ResourcesAutoResponseActionRequest.java | 189 + .../ResourcesAutoResponseActionResponse.java | 191 + .../model/ResourcesBlockLevelRequest.java | 47 + .../model/ResourcesBlockLevelResponse.java | 48 + ...esourcesBlockListConfigurationRequest.java | 141 + ...sourcesBlockListConfigurationResponse.java | 141 + .../ResourcesBlockListConfigurationType.java | 47 + .../com/infobip/model/ResourcesCategory.java | 52 + .../model/ResourcesConfigurationType.java | 62 + .../com/infobip/model/ResourcesDayOfWeek.java | 52 + .../model/ResourcesDeliveryTimeWindow.java | 268 + .../ResourcesDeliveryTimeWindowResponse.java | 275 + .../model/ResourcesDeliveryTimeZone.java | 47 + .../ResourcesDeliveryTimeZoneResponse.java | 48 + .../model/ResourcesDocumentIdentifier.java | 100 + .../ResourcesDocumentRequirementSpec.java | 371 ++ .../infobip/model/ResourcesDocumentType.java | 47 + .../ResourcesEmailDomainMoActionDocs.java | 87 + ...rcesEmailDomainMoConfigurationRequest.java | 232 + ...ResourcesEmailDomainMoHttpForwardDocs.java | 164 + .../model/ResourcesEmailRequirementSpec.java | 332 ++ .../model/ResourcesFacebookCoverageInfo.java | 328 + .../infobip/model/ResourcesFeedbackCode.java | 50 + .../com/infobip/model/ResourcesFieldType.java | 51 + .../model/ResourcesFilledRequirement.java | 158 + .../ResourcesFilledRequirementFeedback.java | 183 + ...ourcesFilledRequirementFeedbackApiDoc.java | 184 + .../model/ResourcesGsmRequirementSpec.java | 332 ++ .../model/ResourcesHttpForwardActionDocs.java | 163 + .../model/ResourcesIbResourceCapability.java | 128 + .../model/ResourcesIbResourceCoverage.java | 153 + .../ResourcesIbResourceCoverageInfo.java | 32 + .../model/ResourcesIbResourceCoverageKey.java | 94 + .../model/ResourcesIbResourceInfo.java | 30 + .../model/ResourcesIbResourceType.java | 53 + .../model/ResourcesIbResourcesFilter.java | 94 + .../model/ResourcesIbResourcesResponse.java | 156 + .../ResourcesInstagramDmHttpForwardDocs.java | 164 + .../ResourcesInstagramDmMoActionDocs.java | 87 + ...rcesInstagramDmMoConfigurationRequest.java | 269 + .../ResourcesIntegerRequirementSpec.java | 443 ++ ...ResourcesIntegerRequirementValidation.java | 147 + .../model/ResourcesKakaoCoverageInfo.java | 328 + .../ResourcesKakaoSangdamHttpForwardDocs.java | 164 + .../ResourcesKakaoSangdamMoActionDocs.java | 87 + ...cesKakaoSangdamMoConfigurationRequest.java | 269 + .../model/ResourcesLineOaMoActionDocs.java | 87 + ...ResourcesLineOaMoConfigurationRequest.java | 232 + .../ResourcesLineOaMoHttpForwardDocs.java | 163 + .../model/ResourcesMailForwardActionDocs.java | 163 + .../model/ResourcesMessengerMoActionDocs.java | 87 + ...ourcesMessengerMoConfigurationRequest.java | 269 + .../ResourcesMessengerMoHttpForwardDocs.java | 164 + .../ResourcesMmsHttpForwardActionDocs.java | 163 + .../model/ResourcesMmsMoActionDocs.java | 90 + .../ResourcesMmsMoConfigurationRequest.java | 361 ++ .../model/ResourcesMmsPullActionDocs.java | 110 + .../infobip/model/ResourcesMoActionDocs.java | 92 + .../ResourcesMoConfigurationRequest.java | 262 + .../ResourcesMoConfigurationResponse.java | 468 ++ .../infobip/model/ResourcesNetworkView.java | 146 + .../model/ResourcesNumberCoverageInfo.java | 403 ++ .../model/ResourcesNumberCoverageKey.java | 169 + ...esNumberRequirementSpecsRequestApiDoc.java | 357 ++ ...esNumberResourceCapabilityChannelDocs.java | 48 + .../model/ResourcesNumberResourceFilter.java | 223 + .../model/ResourcesNumberResourceInfo.java | 415 ++ .../ResourcesNumberResourceOrderApiDoc.java | 864 +++ ...urcesNumberResourceOrderRequestApiDoc.java | 523 ++ .../infobip/model/ResourcesNumberStatus.java | 46 + .../ResourcesNumberTypeResourceMoDocs.java | 47 + .../ResourcesNumberWebhookNotifApiDoc.java | 409 ++ .../ResourcesOpenChannelCoverageInfo.java | 236 + .../ResourcesOpenChannelCoverageKey.java | 163 + .../ResourcesOpenChannelHttpForwardDocs.java | 164 + .../ResourcesOpenChannelMoActionDocs.java | 87 + ...rcesOpenChannelMoConfigurationRequest.java | 306 + .../ResourcesOpenChannelResourceFilter.java | 110 + .../ResourcesOpenChannelResourceInfo.java | 202 + .../ResourcesPageResourceOrderApiDoc.java | 156 + ...esPageResourceOrderApiDocResultsInner.java | 21 + .../infobip/model/ResourcesPlatformDocs.java | 146 + .../model/ResourcesProcuredNumber.java | 195 + .../model/ResourcesPullActionDocs.java | 63 + .../model/ResourcesRcsCoverageInfo.java | 282 + .../model/ResourcesRcsCoverageKey.java | 169 + .../model/ResourcesRcsHttpForwardDocs.java | 163 + .../model/ResourcesRcsMoActionDocs.java | 87 + .../ResourcesRcsMoConfigurationRequest.java | 352 ++ ...urcesRcsRequirementSpecsRequestApiDoc.java | 301 + .../model/ResourcesRcsResourceFilter.java | 110 + .../model/ResourcesRcsResourceInfo.java | 294 + ...ResourcesRcsSenderResourceOrderApiDoc.java | 798 +++ ...esRcsSenderResourceOrderRequestApiDoc.java | 536 ++ .../model/ResourcesRcsWebhookNotifApiDoc.java | 346 ++ .../model/ResourcesRequirementSpec.java | 92 + .../model/ResourcesRequirementSpecs.java | 119 + .../ResourcesRequirementsLookupBody.java | 21 + .../ResourcesResourceCapabilityChannel.java | 57 + .../ResourcesResourceNumberCapability.java | 48 + .../model/ResourcesResourceNumberType.java | 49 + .../ResourcesResourceOrderIdentifier.java | 101 + .../model/ResourcesResourceOrderStatus.java | 55 + .../model/ResourcesSmppForwardActionDocs.java | 110 + .../ResourcesSmsMoConfigurationRequest.java | 399 ++ .../ResourcesSubmitResourceRequestBody.java | 21 + ...sourcesTelegramMoConfigurationRequest.java | 195 + .../model/ResourcesTextRequirementSpec.java | 443 ++ .../ResourcesTextRequirementValidation.java | 192 + .../model/ResourcesTikTokBmMoActionDocs.java | 87 + ...sourcesTikTokBmMoConfigurationRequest.java | 269 + .../ResourcesTikTokBmMoHttpForwardDocs.java | 163 + .../infobip/model/ResourcesTrafficOrigin.java | 47 + .../infobip/model/ResourcesTrafficType.java | 47 + .../infobip/model/ResourcesUnsetOption.java | 52 + .../ResourcesUpdateResourceOrderRequest.java | 128 + .../model/ResourcesUrlRequirementSpec.java | 332 ++ .../infobip/model/ResourcesUseAnswers.java | 106 + .../model/ResourcesUseConversations.java | 106 + .../ResourcesViberBmHttpForwardDocs.java | 163 + .../model/ResourcesViberBmMoActionDocs.java | 87 + ...esourcesViberBmMoConfigurationRequest.java | 306 + .../ResourcesViberBotHttpForwardDocs.java | 163 + .../model/ResourcesViberBotMoActionDocs.java | 87 + ...sourcesViberBotMoConfigurationRequest.java | 269 + .../model/ResourcesViberCoverageInfo.java | 375 ++ .../model/ResourcesViberCoverageKey.java | 261 + .../model/ResourcesViberResourceFilter.java | 110 + .../model/ResourcesViberResourceInfo.java | 387 ++ ...esourcesWebhookNotifApiDocRequestBody.java | 120 + .../ResourcesWebhookNotifApiDocResult.java | 230 + ...ourcesWebhookNotifApiDocResultContent.java | 27 + .../ResourcesWebhookNotifContentType.java | 48 + .../model/ResourcesWebhookNotifEventType.java | 46 + .../ResourcesWhatsAppHttpForwardDocs.java | 163 + .../model/ResourcesWhatsAppMoActionDocs.java | 87 + ...sourcesWhatsAppMoConfigurationRequest.java | 353 ++ .../ResourcesZaloFollowerMoActionDocs.java | 87 + ...cesZaloFollowerMoConfigurationRequest.java | 232 + ...esourcesZaloFollowerMoHttpForwardDocs.java | 164 + .../model/ResourcesZaloZnsMoActionDocs.java | 87 + ...esourcesZaloZnsMoConfigurationRequest.java | 232 + .../ResourcesZaloZnsMoHttpForwardDocs.java | 163 + .../model/ViberOtpTemplateLanguage.java | 2 +- .../ViberOutboundOtpTemplateContent.java | 38 +- .../com/infobip/model/WebRtcHangupSource.java | 2 +- .../infobip/model/WebRtcMachineDetection.java | 146 + .../model/WebRtcMachineDetectionResult.java | 48 + .../infobip/model/WebRtcPhoneCallDetails.java | 39 +- .../infobip/model/WebRtcPhoneDestination.java | 39 +- .../WhatsAppCallingPermissionAction.java | 222 + .../WhatsAppCallingPermissionActionLimit.java | 258 + .../WhatsAppCallingPermissionActionName.java | 47 + .../WhatsAppCallingPermissionResponse.java | 217 + .../WhatsAppCallingPermissionStatus.java | 48 + .../model/WhatsAppConversionDetails.java | 158 + .../WhatsAppDefaultEventRequestOptions.java | 91 + .../java/com/infobip/model/WhatsAppEvent.java | 259 + .../infobip/model/WhatsAppEventOptions.java | 128 + .../infobip/model/WhatsAppEventRequest.java | 164 + .../WhatsAppImageMediaCarouselCardHeader.java | 117 + ...hatsAppInteractiveBodyWhatsAppContent.java | 107 + ...teractiveCallPermissionRequestMessage.java | 463 ++ ...hatsAppInteractiveMediaCarouselAction.java | 91 + ...atsAppInteractiveMediaCarouselContent.java | 141 + ...atsAppInteractiveMediaCarouselMessage.java | 507 ++ ...WhatsAppInteractiveVoiceButtonContent.java | 136 + ...WhatsAppInteractiveVoiceButtonMessage.java | 469 ++ ...iceButtonMessageActionWhatsAppContent.java | 200 + .../WhatsAppMediaCarouselActionType.java | 47 + .../model/WhatsAppMediaCarouselCardBody.java | 106 + .../WhatsAppMediaCarouselCardHeader.java | 90 + .../WhatsAppMediaCarouselCardHeaderType.java | 47 + .../model/WhatsAppMessageGeneralStatus.java | 51 + ...MessageResponseMessageResponseDetails.java | 230 + .../infobip/model/WhatsAppMessageStatus.java | 321 + .../model/WhatsAppMetaConversionModel.java | 233 + .../model/WhatsAppMetaConversionType.java | 59 + .../model/WhatsAppOutboundEventContent.java | 77 + .../WhatsAppOutboundEventContentType.java | 46 + ...ppOutboundEventTypingIndicatorContent.java | 138 + .../com/infobip/model/WhatsAppPayment.java | 6 + .../WhatsAppQuickReplyCardActionButton.java | 158 + ...WhatsAppQuickReplyMediaCarouselAction.java | 138 + .../WhatsAppQuickReplyMediaCarouselCard.java | 214 + .../WhatsAppRequestSchedulingSettings.java | 184 + ...MessageResponseMessageResponseDetails.java | 178 + .../WhatsAppSenderPublicKeyResponse.java | 159 + .../model/WhatsAppShareWabaRequest.java | 97 + .../model/WhatsAppTemplateApiResponse.java | 51 +- .../model/WhatsAppTemplateButtonContent.java | 1 + ...hatsAppTemplateVoiceCallButtonContent.java | 158 + .../infobip/model/WhatsAppToDestination.java | 152 + .../model/WhatsAppUrlCardActionButton.java | 158 + .../model/WhatsAppUrlMediaCarouselAction.java | 137 + .../model/WhatsAppUrlMediaCarouselCard.java | 183 + .../WhatsAppVideoMediaCarouselCardHeader.java | 117 + .../model/WhatsAppVoiceCallButtonApiData.java | 51 +- .../WhatsAppWABAConversionEventRequest.java | 179 + ...AppWebhookMarketingUpdateNotification.java | 241 + ...okMarketingUpdateNotificationResponse.java | 186 + .../java/com/infobip/RequestFactoryTest.java | 2 +- .../java/com/infobip/api/CallsApiTest.java | 16 +- .../java/com/infobip/api/MessagesApiTest.java | 3 +- .../java/com/infobip/api/NumbersApiTest.java | 5300 +++++++++++++++++ src/test/java/com/infobip/api/RcsApiTest.java | 131 +- .../com/infobip/api/ResourcesApiTest.java | 1528 +++++ .../java/com/infobip/api/WhatsAppApiTest.java | 16 + 422 files changed, 83784 insertions(+), 1351 deletions(-) create mode 100644 src/main/java/com/infobip/api/NumbersApi.java create mode 100644 src/main/java/com/infobip/api/ResourcesApi.java create mode 100644 src/main/java/com/infobip/model/CallsAddress.java create mode 100644 src/main/java/com/infobip/model/CallsCnam.java create mode 100644 src/main/java/com/infobip/model/CallsCnamDelivery.java create mode 100644 src/main/java/com/infobip/model/CallsCnamDeliveryStatus.java create mode 100644 src/main/java/com/infobip/model/CallsCnamStorage.java create mode 100644 src/main/java/com/infobip/model/CallsCnamStorageStatus.java delete mode 100644 src/main/java/com/infobip/model/CallsDialogRecordingResponse.java create mode 100644 src/main/java/com/infobip/model/CallsDirection.java create mode 100644 src/main/java/com/infobip/model/CallsEmergencyAddress.java create mode 100644 src/main/java/com/infobip/model/CallsEmergencyAddressStatus.java create mode 100644 src/main/java/com/infobip/model/CallsPlayTty.java create mode 100644 src/main/java/com/infobip/model/CallsPlayTtyOptions.java create mode 100644 src/main/java/com/infobip/model/CallsPublicCnamStatus.java rename src/main/java/com/infobip/model/{CallsSipTrunkRegistrationCredentials.java => CallsSipTrunkRegisteredResetPasswordResponse.java} (71%) create mode 100644 src/main/java/com/infobip/model/CallsSipTrunkResetPasswordResponse.java create mode 100644 src/main/java/com/infobip/model/CallsTtyPlayContent.java create mode 100644 src/main/java/com/infobip/model/CallsValidateAddressResponse.java create mode 100644 src/main/java/com/infobip/model/GetResourceRequest200Response.java create mode 100644 src/main/java/com/infobip/model/MessagesApiInboundTypingStartedChannel.java rename src/main/java/com/infobip/model/{MessagesApiInboundTypingIndicatorChannel.java => MessagesApiInboundTypingStoppedChannel.java} (76%) create mode 100644 src/main/java/com/infobip/model/MessagesApiOutboundSeenEvent.java rename src/main/java/com/infobip/model/{MessagesApiOutboundEventChannel.java => MessagesApiOutboundSeenEventChannel.java} (76%) create mode 100644 src/main/java/com/infobip/model/MessagesApiOutboundTypingStartedEventChannel.java create mode 100644 src/main/java/com/infobip/model/MessagesApiOutboundTypingStoppedEventChannel.java create mode 100644 src/main/java/com/infobip/model/MoActionType.java create mode 100644 src/main/java/com/infobip/model/NumberType.java create mode 100644 src/main/java/com/infobip/model/NumbersAddress.java create mode 100644 src/main/java/com/infobip/model/NumbersAegisVetImportRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersAppealData.java create mode 100644 src/main/java/com/infobip/model/NumbersAppealRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersAttachNumberPoolRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersBrand.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookContent.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookMessage.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandPreview.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandRegistrar.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandRegistrationStatusPublic.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookContent.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookMessage.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandStage.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandType.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandVet.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandVetStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookContent.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookMessage.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersBrandWebhookPlatform.java create mode 100644 src/main/java/com/infobip/model/NumbersBusinessIdentifier.java create mode 100644 src/main/java/com/infobip/model/NumbersBusinessIdentifierType.java create mode 100644 src/main/java/com/infobip/model/NumbersBusinessRegistrationType.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaign.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookContent.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookMessage.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignFeedback.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookContent.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookMessage.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignRegistrar.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignStage.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignStatusWebhookContent.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignStatusWebhookMessage.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignStatusWebhookResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignType.java create mode 100644 src/main/java/com/infobip/model/NumbersCampaignWebhookPlatform.java create mode 100644 src/main/java/com/infobip/model/NumbersCvVetImportRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersDataUniversalNumberingSystemNumber.java create mode 100644 src/main/java/com/infobip/model/NumbersDocumentMetadata.java create mode 100644 src/main/java/com/infobip/model/NumbersDownloadResponseModel.java create mode 100644 src/main/java/com/infobip/model/NumbersEditPermissions.java create mode 100644 src/main/java/com/infobip/model/NumbersExternalAutomaticReviewError.java create mode 100644 src/main/java/com/infobip/model/NumbersExternalAutomaticReviewResults.java create mode 100644 src/main/java/com/infobip/model/NumbersExternalAutomaticReviewStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersExternalTenDlcCampaign.java create mode 100644 src/main/java/com/infobip/model/NumbersForwardToCallRoutingDetails.java create mode 100644 src/main/java/com/infobip/model/NumbersForwardToIvrActionDetails.java create mode 100644 src/main/java/com/infobip/model/NumbersForwardToPstnActionDetails.java create mode 100644 src/main/java/com/infobip/model/NumbersForwardToSubscriptionDetails.java create mode 100644 src/main/java/com/infobip/model/NumbersGlobalIntermediaryIdentificationNumber.java create mode 100644 src/main/java/com/infobip/model/NumbersGovernmentBrand.java create mode 100644 src/main/java/com/infobip/model/NumbersInteractiveVoiceResponseOptIn.java create mode 100644 src/main/java/com/infobip/model/NumbersKeywordOptIn.java create mode 100644 src/main/java/com/infobip/model/NumbersLegalEntityIdentifier.java create mode 100644 src/main/java/com/infobip/model/NumbersMessageType.java create mode 100644 src/main/java/com/infobip/model/NumbersNetwork.java create mode 100644 src/main/java/com/infobip/model/NumbersNetworkState.java create mode 100644 src/main/java/com/infobip/model/NumbersNetworkStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersNonProfitBrand.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberCapabilityType.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberConfigurationModel.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPool.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPoolAvailability.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPoolStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPoolType.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPoolUsageApiPageResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPoolUsageApiResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPreview.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPreviews.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberPrice.java create mode 100644 src/main/java/com/infobip/model/NumbersNumberResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersOptIns.java create mode 100644 src/main/java/com/infobip/model/NumbersPageResponseBrand.java create mode 100644 src/main/java/com/infobip/model/NumbersPageResponseBrandVet.java create mode 100644 src/main/java/com/infobip/model/NumbersPageResponseCampaign.java create mode 100644 src/main/java/com/infobip/model/NumbersPolicyType.java create mode 100644 src/main/java/com/infobip/model/NumbersPriority.java create mode 100644 src/main/java/com/infobip/model/NumbersPriorityInfo.java create mode 100644 src/main/java/com/infobip/model/NumbersPriorityTimeData.java create mode 100644 src/main/java/com/infobip/model/NumbersPriorityTimeUnit.java create mode 100644 src/main/java/com/infobip/model/NumbersPriorityType.java create mode 100644 src/main/java/com/infobip/model/NumbersPrivateCompanyBrand.java create mode 100644 src/main/java/com/infobip/model/NumbersPublicCompanyBrand.java create mode 100644 src/main/java/com/infobip/model/NumbersRecordingBody.java create mode 100644 src/main/java/com/infobip/model/NumbersRegisterCampaignRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersRejectionReason.java create mode 100644 src/main/java/com/infobip/model/NumbersRejectionReasonPayload.java create mode 100644 src/main/java/com/infobip/model/NumbersReservationStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersReviewSubmissionResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersReviewType.java create mode 100644 src/main/java/com/infobip/model/NumbersStatusResponse.java create mode 100644 src/main/java/com/infobip/model/NumbersStockExchange.java create mode 100644 src/main/java/com/infobip/model/NumbersTenDlcAiReviewRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersTenDlcCampaign.java create mode 100644 src/main/java/com/infobip/model/NumbersTenDlcUseCase.java create mode 100644 src/main/java/com/infobip/model/NumbersTollFreeBrand.java create mode 100644 src/main/java/com/infobip/model/NumbersTollFreeCampaign.java create mode 100644 src/main/java/com/infobip/model/NumbersTollFreeMessageVolume.java create mode 100644 src/main/java/com/infobip/model/NumbersTollFreeUnifiedNumberCampaignApiModel.java create mode 100644 src/main/java/com/infobip/model/NumbersTollFreeUseCase.java create mode 100644 src/main/java/com/infobip/model/NumbersUpdateCampaignRegistrationRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersUpdateOwnedNumberRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersVerbalOptIn.java create mode 100644 src/main/java/com/infobip/model/NumbersVertical.java create mode 100644 src/main/java/com/infobip/model/NumbersVetImportRequest.java create mode 100644 src/main/java/com/infobip/model/NumbersVettingProvider.java create mode 100644 src/main/java/com/infobip/model/NumbersVettingType.java create mode 100644 src/main/java/com/infobip/model/NumbersVoiceActionDetails.java create mode 100644 src/main/java/com/infobip/model/NumbersVoiceForwardToAnswersDetails.java create mode 100644 src/main/java/com/infobip/model/NumbersVoiceForwardToConversationsDetails.java create mode 100644 src/main/java/com/infobip/model/NumbersVoiceNumberMaskingActionDetails.java create mode 100644 src/main/java/com/infobip/model/NumbersVoiceSetup.java create mode 100644 src/main/java/com/infobip/model/NumbersWebOptIn.java create mode 100644 src/main/java/com/infobip/model/NumbersWebhookBrandRegistrationStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersWebhookBrandVetStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersWebhookBrandVettingType.java create mode 100644 src/main/java/com/infobip/model/NumbersWebhookCampaignNetworkStatus.java create mode 100644 src/main/java/com/infobip/model/NumbersWebhookCampaignStage.java create mode 100644 src/main/java/com/infobip/model/NumbersWmcVetImportRequest.java create mode 100644 src/main/java/com/infobip/model/RcsConversationInfo.java create mode 100644 src/main/java/com/infobip/model/RcsConversationStartedEvent.java create mode 100644 src/main/java/com/infobip/model/RcsConversationStartedEventContent.java create mode 100644 src/main/java/com/infobip/model/RcsConversationStartedEventType.java create mode 100644 src/main/java/com/infobip/model/RcsConversationStartedEvents.java create mode 100644 src/main/java/com/infobip/model/RcsConversationStartedInfo.java create mode 100644 src/main/java/com/infobip/model/RcsConversationType.java create mode 100644 src/main/java/com/infobip/model/RcsEventInteractionType.java rename src/main/java/com/infobip/model/{RcsInboundMessageEventContent.java => RcsInboundEvent.java} (64%) rename src/main/java/com/infobip/model/{RcsInboundMessageRcsInboundMessageContent.java => RcsInboundMessage.java} (61%) create mode 100644 src/main/java/com/infobip/model/RcsMessageInteractionType.java create mode 100644 src/main/java/com/infobip/model/RcsMessagePrice.java create mode 100644 src/main/java/com/infobip/model/RcsPlatformInfo.java create mode 100644 src/main/java/com/infobip/model/RcsTrafficType.java create mode 100644 src/main/java/com/infobip/model/ResourcesAlphaCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesAlphaCoverageKey.java create mode 100644 src/main/java/com/infobip/model/ResourcesAlphaRequirementSpecsRequestApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesAlphaResourceFilter.java create mode 100644 src/main/java/com/infobip/model/ResourcesAlphaResourceInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesAlphaResourceOrderApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesAlphaResourceOrderRequestApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesAlphaWebhookNotifApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesAppleCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesAppleCoverageKey.java create mode 100644 src/main/java/com/infobip/model/ResourcesAppleMbMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesAppleMbMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesAppleMbMoHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesAppleResourceFilter.java create mode 100644 src/main/java/com/infobip/model/ResourcesAppleResourceInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesAttachment.java create mode 100644 src/main/java/com/infobip/model/ResourcesAutoResponseActionRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesAutoResponseActionResponse.java create mode 100644 src/main/java/com/infobip/model/ResourcesBlockLevelRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesBlockLevelResponse.java create mode 100644 src/main/java/com/infobip/model/ResourcesBlockListConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesBlockListConfigurationResponse.java create mode 100644 src/main/java/com/infobip/model/ResourcesBlockListConfigurationType.java create mode 100644 src/main/java/com/infobip/model/ResourcesCategory.java create mode 100644 src/main/java/com/infobip/model/ResourcesConfigurationType.java create mode 100644 src/main/java/com/infobip/model/ResourcesDayOfWeek.java create mode 100644 src/main/java/com/infobip/model/ResourcesDeliveryTimeWindow.java create mode 100644 src/main/java/com/infobip/model/ResourcesDeliveryTimeWindowResponse.java create mode 100644 src/main/java/com/infobip/model/ResourcesDeliveryTimeZone.java create mode 100644 src/main/java/com/infobip/model/ResourcesDeliveryTimeZoneResponse.java create mode 100644 src/main/java/com/infobip/model/ResourcesDocumentIdentifier.java create mode 100644 src/main/java/com/infobip/model/ResourcesDocumentRequirementSpec.java create mode 100644 src/main/java/com/infobip/model/ResourcesDocumentType.java create mode 100644 src/main/java/com/infobip/model/ResourcesEmailDomainMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesEmailDomainMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesEmailDomainMoHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesEmailRequirementSpec.java create mode 100644 src/main/java/com/infobip/model/ResourcesFacebookCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesFeedbackCode.java create mode 100644 src/main/java/com/infobip/model/ResourcesFieldType.java create mode 100644 src/main/java/com/infobip/model/ResourcesFilledRequirement.java create mode 100644 src/main/java/com/infobip/model/ResourcesFilledRequirementFeedback.java create mode 100644 src/main/java/com/infobip/model/ResourcesFilledRequirementFeedbackApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesGsmRequirementSpec.java create mode 100644 src/main/java/com/infobip/model/ResourcesHttpForwardActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesIbResourceCapability.java create mode 100644 src/main/java/com/infobip/model/ResourcesIbResourceCoverage.java create mode 100644 src/main/java/com/infobip/model/ResourcesIbResourceCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesIbResourceCoverageKey.java create mode 100644 src/main/java/com/infobip/model/ResourcesIbResourceInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesIbResourceType.java create mode 100644 src/main/java/com/infobip/model/ResourcesIbResourcesFilter.java create mode 100644 src/main/java/com/infobip/model/ResourcesIbResourcesResponse.java create mode 100644 src/main/java/com/infobip/model/ResourcesInstagramDmHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesInstagramDmMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesInstagramDmMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesIntegerRequirementSpec.java create mode 100644 src/main/java/com/infobip/model/ResourcesIntegerRequirementValidation.java create mode 100644 src/main/java/com/infobip/model/ResourcesKakaoCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesKakaoSangdamHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesKakaoSangdamMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesKakaoSangdamMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesLineOaMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesLineOaMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesLineOaMoHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesMailForwardActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesMessengerMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesMessengerMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesMessengerMoHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesMmsHttpForwardActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesMmsMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesMmsMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesMmsPullActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesMoConfigurationResponse.java create mode 100644 src/main/java/com/infobip/model/ResourcesNetworkView.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberCoverageKey.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberRequirementSpecsRequestApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberResourceCapabilityChannelDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberResourceFilter.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberResourceInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberResourceOrderApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberResourceOrderRequestApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberStatus.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberTypeResourceMoDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesNumberWebhookNotifApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesOpenChannelCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesOpenChannelCoverageKey.java create mode 100644 src/main/java/com/infobip/model/ResourcesOpenChannelHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesOpenChannelMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesOpenChannelMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesOpenChannelResourceFilter.java create mode 100644 src/main/java/com/infobip/model/ResourcesOpenChannelResourceInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesPageResourceOrderApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesPageResourceOrderApiDocResultsInner.java create mode 100644 src/main/java/com/infobip/model/ResourcesPlatformDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesProcuredNumber.java create mode 100644 src/main/java/com/infobip/model/ResourcesPullActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsCoverageKey.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsRequirementSpecsRequestApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsResourceFilter.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsResourceInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderRequestApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesRcsWebhookNotifApiDoc.java create mode 100644 src/main/java/com/infobip/model/ResourcesRequirementSpec.java create mode 100644 src/main/java/com/infobip/model/ResourcesRequirementSpecs.java create mode 100644 src/main/java/com/infobip/model/ResourcesRequirementsLookupBody.java create mode 100644 src/main/java/com/infobip/model/ResourcesResourceCapabilityChannel.java create mode 100644 src/main/java/com/infobip/model/ResourcesResourceNumberCapability.java create mode 100644 src/main/java/com/infobip/model/ResourcesResourceNumberType.java create mode 100644 src/main/java/com/infobip/model/ResourcesResourceOrderIdentifier.java create mode 100644 src/main/java/com/infobip/model/ResourcesResourceOrderStatus.java create mode 100644 src/main/java/com/infobip/model/ResourcesSmppForwardActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesSmsMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesSubmitResourceRequestBody.java create mode 100644 src/main/java/com/infobip/model/ResourcesTelegramMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesTextRequirementSpec.java create mode 100644 src/main/java/com/infobip/model/ResourcesTextRequirementValidation.java create mode 100644 src/main/java/com/infobip/model/ResourcesTikTokBmMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesTikTokBmMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesTikTokBmMoHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesTrafficOrigin.java create mode 100644 src/main/java/com/infobip/model/ResourcesTrafficType.java create mode 100644 src/main/java/com/infobip/model/ResourcesUnsetOption.java create mode 100644 src/main/java/com/infobip/model/ResourcesUpdateResourceOrderRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesUrlRequirementSpec.java create mode 100644 src/main/java/com/infobip/model/ResourcesUseAnswers.java create mode 100644 src/main/java/com/infobip/model/ResourcesUseConversations.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberBmHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberBmMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberBmMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberBotHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberBotMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberBotMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberCoverageInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberCoverageKey.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberResourceFilter.java create mode 100644 src/main/java/com/infobip/model/ResourcesViberResourceInfo.java create mode 100644 src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocRequestBody.java create mode 100644 src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocResult.java create mode 100644 src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocResultContent.java create mode 100644 src/main/java/com/infobip/model/ResourcesWebhookNotifContentType.java create mode 100644 src/main/java/com/infobip/model/ResourcesWebhookNotifEventType.java create mode 100644 src/main/java/com/infobip/model/ResourcesWhatsAppHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesWhatsAppMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesWhatsAppMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesZaloFollowerMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesZaloFollowerMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesZaloFollowerMoHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesZaloZnsMoActionDocs.java create mode 100644 src/main/java/com/infobip/model/ResourcesZaloZnsMoConfigurationRequest.java create mode 100644 src/main/java/com/infobip/model/ResourcesZaloZnsMoHttpForwardDocs.java create mode 100644 src/main/java/com/infobip/model/WebRtcMachineDetection.java create mode 100644 src/main/java/com/infobip/model/WebRtcMachineDetectionResult.java create mode 100644 src/main/java/com/infobip/model/WhatsAppCallingPermissionAction.java create mode 100644 src/main/java/com/infobip/model/WhatsAppCallingPermissionActionLimit.java create mode 100644 src/main/java/com/infobip/model/WhatsAppCallingPermissionActionName.java create mode 100644 src/main/java/com/infobip/model/WhatsAppCallingPermissionResponse.java create mode 100644 src/main/java/com/infobip/model/WhatsAppCallingPermissionStatus.java create mode 100644 src/main/java/com/infobip/model/WhatsAppConversionDetails.java create mode 100644 src/main/java/com/infobip/model/WhatsAppDefaultEventRequestOptions.java create mode 100644 src/main/java/com/infobip/model/WhatsAppEvent.java create mode 100644 src/main/java/com/infobip/model/WhatsAppEventOptions.java create mode 100644 src/main/java/com/infobip/model/WhatsAppEventRequest.java create mode 100644 src/main/java/com/infobip/model/WhatsAppImageMediaCarouselCardHeader.java create mode 100644 src/main/java/com/infobip/model/WhatsAppInteractiveBodyWhatsAppContent.java create mode 100644 src/main/java/com/infobip/model/WhatsAppInteractiveCallPermissionRequestMessage.java create mode 100644 src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselAction.java create mode 100644 src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselContent.java create mode 100644 src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselMessage.java create mode 100644 src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonContent.java create mode 100644 src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonMessage.java create mode 100644 src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMediaCarouselActionType.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMediaCarouselCardBody.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMediaCarouselCardHeader.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMediaCarouselCardHeaderType.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMessageGeneralStatus.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMessageResponseMessageResponseDetails.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMessageStatus.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMetaConversionModel.java create mode 100644 src/main/java/com/infobip/model/WhatsAppMetaConversionType.java create mode 100644 src/main/java/com/infobip/model/WhatsAppOutboundEventContent.java create mode 100644 src/main/java/com/infobip/model/WhatsAppOutboundEventContentType.java create mode 100644 src/main/java/com/infobip/model/WhatsAppOutboundEventTypingIndicatorContent.java create mode 100644 src/main/java/com/infobip/model/WhatsAppQuickReplyCardActionButton.java create mode 100644 src/main/java/com/infobip/model/WhatsAppQuickReplyMediaCarouselAction.java create mode 100644 src/main/java/com/infobip/model/WhatsAppQuickReplyMediaCarouselCard.java create mode 100644 src/main/java/com/infobip/model/WhatsAppRequestSchedulingSettings.java create mode 100644 src/main/java/com/infobip/model/WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails.java create mode 100644 src/main/java/com/infobip/model/WhatsAppSenderPublicKeyResponse.java create mode 100644 src/main/java/com/infobip/model/WhatsAppShareWabaRequest.java create mode 100644 src/main/java/com/infobip/model/WhatsAppTemplateVoiceCallButtonContent.java create mode 100644 src/main/java/com/infobip/model/WhatsAppToDestination.java create mode 100644 src/main/java/com/infobip/model/WhatsAppUrlCardActionButton.java create mode 100644 src/main/java/com/infobip/model/WhatsAppUrlMediaCarouselAction.java create mode 100644 src/main/java/com/infobip/model/WhatsAppUrlMediaCarouselCard.java create mode 100644 src/main/java/com/infobip/model/WhatsAppVideoMediaCarouselCardHeader.java create mode 100644 src/main/java/com/infobip/model/WhatsAppWABAConversionEventRequest.java create mode 100644 src/main/java/com/infobip/model/WhatsAppWebhookMarketingUpdateNotification.java create mode 100644 src/main/java/com/infobip/model/WhatsAppWebhookMarketingUpdateNotificationResponse.java create mode 100644 src/test/java/com/infobip/api/NumbersApiTest.java create mode 100644 src/test/java/com/infobip/api/ResourcesApiTest.java diff --git a/README.md b/README.md index 39bdba2..7505d43 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ The current version of this library includes this subset of Infobip products: * [Viber](https://www.infobip.com/docs/api/channels/viber) * [Messages API](https://www.infobip.com/docs/api/platform/messages-api) * [Moments API](https://www.infobip.com/docs/api/customer-engagement/moments) -* [RCS](https://www.infobip.com/docs/api/channels/rcs) ## General Info For `infobip-api-java-client` versioning we use [Semantic Versioning][semver] scheme. @@ -50,7 +49,7 @@ Simply add the following in your project's POM file under `dependencies` tag: com.infobip infobip-api-java-client - 6.3.0 + 6.4.0 ``` @@ -200,37 +199,31 @@ Example of webhook implementation with Spring Web framework: } ``` #### Two-Factor Authentication (2FA) -For the 2FA quick start guide, view [these examples](two-factor-authentication.md). +For 2FA quick start guide, view [these examples](two-factor-authentication.md). #### Email -For the Email quick start guide, view [these examples](email.md). +For Email quick start guide, view [these examples](email.md). #### WhatsApp -For the WhatsApp quick start guide, view [these examples](whatsapp.md). +For WhatsApp quick start guide, view [these examples](whatsapp.md). #### Messages API -For the Messages API quick start guide, view [these examples](messages-api.md). +For Messages API quick start guide, view [these examples](messages-api.md). #### Moments -For the Moments quick start guide, view [these examples](moments.md). - -## Versioning - -This project follows a pragmatic Semantic Versioning approach. -For full details on how versions are managed, please see our [Versioning guide][versioning]. +For Moments quick start guide, view [these examples](moments.md). ## Ask for help -Feel free to open an issue on the repository if you see any problem or want to request a feature. For pull requests, go to the `CONTRIBUTING` [file][contributing] related to it. This code is auto generated, and we are unable to merge any pull requests form here. +Feel free to open issues on the repository for any encountered problem or feature request. For pull requests, go to the `CONTRIBUTING` [file][contributing] related to it. This code is auto generated, and we are unable to merge any pull requests form here. This code is auto generated, and we are unable to merge any pull request from here, but we will review and implement changes directly within our pipeline, as described in the `CONTRIBUTING` [file][contributing]. -For anything that requires our immediate attention, contact us @ [support@infobip.com](mailto:support@infobip.com). +For anything that requires our imminent attention, contact us @ [support@infobip.com](mailto:support@infobip.com). [apidocs]: https://www.infobip.com/docs/api [freetrial]: https://www.infobip.com/docs/essentials/getting-started/free-trial [signup]: https://www.infobip.com/signup [semver]: https://semver.org [license]: LICENSE -[contributing]: CONTRIBUTING.md -[versioning]: VERSIONING.md \ No newline at end of file +[contributing]: CONTRIBUTING.md \ No newline at end of file diff --git a/pom.xml b/pom.xml index d7f7e5f..eb4a98a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.infobip infobip-api-java-client - 6.3.0 + 6.4.0 jar infobip-api-java-client diff --git a/src/main/java/com/infobip/RequestFactory.java b/src/main/java/com/infobip/RequestFactory.java index ae3f41f..91e4225 100644 --- a/src/main/java/com/infobip/RequestFactory.java +++ b/src/main/java/com/infobip/RequestFactory.java @@ -26,7 +26,7 @@ */ final class RequestFactory { - private static final String USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.3.0"; + private static final String USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.4.0"; private final ApiKey apiKey; private final BaseUrl baseUrl; diff --git a/src/main/java/com/infobip/api/CallsApi.java b/src/main/java/com/infobip/api/CallsApi.java index 5752dcc..58c462a 100644 --- a/src/main/java/com/infobip/api/CallsApi.java +++ b/src/main/java/com/infobip/api/CallsApi.java @@ -56,7 +56,6 @@ import com.infobip.model.CallsDialogPlayRequest; import com.infobip.model.CallsDialogRecordingPage; import com.infobip.model.CallsDialogRecordingRequest; -import com.infobip.model.CallsDialogRecordingResponse; import com.infobip.model.CallsDialogRequest; import com.infobip.model.CallsDialogResponse; import com.infobip.model.CallsDialogSayRequest; @@ -76,6 +75,7 @@ import com.infobip.model.CallsPreAnswerRequest; import com.infobip.model.CallsPublicConferenceRecording; import com.infobip.model.CallsPublicCountry; +import com.infobip.model.CallsPublicDialogRecording; import com.infobip.model.CallsPublicRecording; import com.infobip.model.CallsPublicRecordingFile; import com.infobip.model.CallsPublicRegion; @@ -87,8 +87,8 @@ import com.infobip.model.CallsRescheduleRequest; import com.infobip.model.CallsSayRequest; import com.infobip.model.CallsSipTrunkPage; -import com.infobip.model.CallsSipTrunkRegistrationCredentials; import com.infobip.model.CallsSipTrunkRequest; +import com.infobip.model.CallsSipTrunkResetPasswordResponse; import com.infobip.model.CallsSipTrunkResponse; import com.infobip.model.CallsSipTrunkServiceAddressPage; import com.infobip.model.CallsSipTrunkStatusRequest; @@ -2828,13 +2828,13 @@ public DeleteDialogRecordingsRequest location(CallsRecordingLocation location) { /** * Executes the deleteDialogRecordings request. * - * @return CallsDialogRecordingResponse The deserialized response. + * @return CallsPublicDialogRecording The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsDialogRecordingResponse execute() throws ApiException { + public CallsPublicDialogRecording execute() throws ApiException { RequestDefinition deleteDialogRecordingsDefinition = deleteDialogRecordingsDefinition(dialogId, location); return apiClient.execute( - deleteDialogRecordingsDefinition, new TypeReference() {}.getType()); + deleteDialogRecordingsDefinition, new TypeReference() {}.getType()); } /** @@ -2843,11 +2843,11 @@ public CallsDialogRecordingResponse execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition deleteDialogRecordingsDefinition = deleteDialogRecordingsDefinition(dialogId, location); return apiClient.executeAsync( deleteDialogRecordingsDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } @@ -6015,13 +6015,13 @@ public GetDialogRecordingsRequest location(CallsRecordingLocation location) { /** * Executes the getDialogRecordings request. * - * @return CallsDialogRecordingResponse The deserialized response. + * @return CallsPublicDialogRecording The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsDialogRecordingResponse execute() throws ApiException { + public CallsPublicDialogRecording execute() throws ApiException { RequestDefinition getDialogRecordingsDefinition = getDialogRecordingsDefinition(dialogId, location); return apiClient.execute( - getDialogRecordingsDefinition, new TypeReference() {}.getType()); + getDialogRecordingsDefinition, new TypeReference() {}.getType()); } /** @@ -6030,11 +6030,11 @@ public CallsDialogRecordingResponse execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition getDialogRecordingsDefinition = getDialogRecordingsDefinition(dialogId, location); return apiClient.executeAsync( getDialogRecordingsDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } @@ -7746,14 +7746,14 @@ private ResetSipTrunkPasswordRequest(String sipTrunkId) { /** * Executes the resetSipTrunkPassword request. * - * @return CallsSipTrunkRegistrationCredentials The deserialized response. + * @return CallsSipTrunkResetPasswordResponse The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsSipTrunkRegistrationCredentials execute() throws ApiException { + public CallsSipTrunkResetPasswordResponse execute() throws ApiException { RequestDefinition resetSipTrunkPasswordDefinition = resetSipTrunkPasswordDefinition(sipTrunkId); return apiClient.execute( resetSipTrunkPasswordDefinition, - new TypeReference() {}.getType()); + new TypeReference() {}.getType()); } /** @@ -7762,21 +7762,21 @@ public CallsSipTrunkRegistrationCredentials execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition resetSipTrunkPasswordDefinition = resetSipTrunkPasswordDefinition(sipTrunkId); return apiClient.executeAsync( resetSipTrunkPasswordDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } /** - * Reset registered SIP trunk password. + * Reset SIP trunk credentials. *

* Reset password. Applicable only for `REGISTERED` SIP trunks. * - * @param sipTrunkId Sip Trunk ID. (required) + * @param sipTrunkId SIP trunk ID. (required) * @return ResetSipTrunkPasswordRequest */ public ResetSipTrunkPasswordRequest resetSipTrunkPassword(String sipTrunkId) { diff --git a/src/main/java/com/infobip/api/EmailApi.java b/src/main/java/com/infobip/api/EmailApi.java index a46f4ea..92371e7 100644 --- a/src/main/java/com/infobip/api/EmailApi.java +++ b/src/main/java/com/infobip/api/EmailApi.java @@ -1949,7 +1949,9 @@ private RequestDefinition sendEmailDefinition( String applicationId, String entityId, String headers, - String ipPoolId) { + String ipPoolId, + Boolean skipPassiveStorage, + Boolean skipActiveStorage) { RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/email/3/send") .requiresAuthentication(true) .accept("application/json") @@ -2060,6 +2062,12 @@ private RequestDefinition sendEmailDefinition( if (ipPoolId != null) { builder.addFormParameter(new Parameter("ipPoolId", ipPoolId)); } + if (skipPassiveStorage != null) { + builder.addFormParameter(new Parameter("skipPassiveStorage", skipPassiveStorage)); + } + if (skipActiveStorage != null) { + builder.addFormParameter(new Parameter("skipActiveStorage", skipActiveStorage)); + } return builder.build(); } @@ -2102,6 +2110,8 @@ public class SendEmailRequest { private String entityId; private String headers; private String ipPoolId; + private Boolean skipPassiveStorage; + private Boolean skipActiveStorage; private SendEmailRequest(List to) { this.to = Objects.requireNonNull(to, "The required parameter 'to' is missing."); @@ -2481,6 +2491,28 @@ public SendEmailRequest ipPoolId(String ipPoolId) { return this; } + /** + * Sets skipPassiveStorage. + * + * @param skipPassiveStorage Set to true to skip [passive email storage](https://www.infobip.com/docs/email/email-storage-and-retrieval/passive-email-storage) (long-term storage used for compliance, legal, or audit purposes). If `false` or not set, the account-level setting is used. (optional) + * @return SendEmailRequest + */ + public SendEmailRequest skipPassiveStorage(Boolean skipPassiveStorage) { + this.skipPassiveStorage = skipPassiveStorage; + return this; + } + + /** + * Sets skipActiveStorage. + * + * @param skipActiveStorage Set to true to skip [active email storage](https://www.infobip.com/docs/email/email-storage-and-retrieval/active-email-storage) (short-term storage used for troubleshooting or support). If `false` or not set, the account-level setting is used. (optional) + * @return SendEmailRequest + */ + public SendEmailRequest skipActiveStorage(Boolean skipActiveStorage) { + this.skipActiveStorage = skipActiveStorage; + return this; + } + /** * Executes the sendEmail request. * @@ -2523,7 +2555,9 @@ public EmailSendResponse execute() throws ApiException { applicationId, entityId, headers, - ipPoolId); + ipPoolId, + skipPassiveStorage, + skipActiveStorage); return apiClient.execute(sendEmailDefinition, new TypeReference() {}.getType()); } @@ -2569,7 +2603,9 @@ public okhttp3.Call executeAsync(ApiCallback callback) { applicationId, entityId, headers, - ipPoolId); + ipPoolId, + skipPassiveStorage, + skipActiveStorage); return apiClient.executeAsync( sendEmailDefinition, new TypeReference() {}.getType(), callback); } diff --git a/src/main/java/com/infobip/api/NumbersApi.java b/src/main/java/com/infobip/api/NumbersApi.java new file mode 100644 index 0000000..6e225be --- /dev/null +++ b/src/main/java/com/infobip/api/NumbersApi.java @@ -0,0 +1,4240 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.api; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.infobip.ApiCallback; +import com.infobip.ApiClient; +import com.infobip.ApiException; +import com.infobip.Parameter; +import com.infobip.RequestDefinition; +import com.infobip.model.CallsAddress; +import com.infobip.model.CallsCnam; +import com.infobip.model.CallsEmergencyAddress; +import com.infobip.model.CallsEmergencyAddressStatus; +import com.infobip.model.CallsPublicCnamStatus; +import com.infobip.model.CallsValidateAddressResponse; +import com.infobip.model.NumbersAppealRequest; +import com.infobip.model.NumbersAttachNumberPoolRequest; +import com.infobip.model.NumbersBrand; +import com.infobip.model.NumbersBrandStatus; +import com.infobip.model.NumbersBrandVet; +import com.infobip.model.NumbersCampaign; +import com.infobip.model.NumbersDocumentMetadata; +import com.infobip.model.NumbersDownloadResponseModel; +import com.infobip.model.NumbersExternalAutomaticReviewResults; +import com.infobip.model.NumbersNetworkStatus; +import com.infobip.model.NumbersNumberConfigurationModel; +import com.infobip.model.NumbersNumberPoolAvailability; +import com.infobip.model.NumbersNumberPoolUsageApiPageResponse; +import com.infobip.model.NumbersNumberPreviews; +import com.infobip.model.NumbersNumberResponse; +import com.infobip.model.NumbersPageResponseBrand; +import com.infobip.model.NumbersPageResponseBrandVet; +import com.infobip.model.NumbersPageResponseCampaign; +import com.infobip.model.NumbersPriority; +import com.infobip.model.NumbersRegisterCampaignRequest; +import com.infobip.model.NumbersResponse; +import com.infobip.model.NumbersReviewSubmissionResponse; +import com.infobip.model.NumbersTenDlcAiReviewRequest; +import com.infobip.model.NumbersTollFreeUnifiedNumberCampaignApiModel; +import com.infobip.model.NumbersUpdateCampaignRegistrationRequest; +import com.infobip.model.NumbersUpdateOwnedNumberRequest; +import com.infobip.model.NumbersVetImportRequest; +import com.infobip.model.NumbersVoiceSetup; +import java.io.File; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents NumbersApi API client. + */ +public class NumbersApi { + + private final ApiClient apiClient; + + /** + * Constructs a new instance of NumbersApi. + * + * @param apiClient {@link ApiClient} instance to delegate calls to. + */ + public NumbersApi(ApiClient apiClient) { + this.apiClient = Objects.requireNonNull(apiClient, "ApiClient must not be null!"); + } + + private RequestDefinition addNumbersDefinition( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/{campaignId}/add-numbers") + .body(numbersUpdateCampaignRegistrationRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * addNumbers request builder class. + */ + public class AddNumbersRequest { + private final UUID campaignId; + private final NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest; + + private AddNumbersRequest( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + this.numbersUpdateCampaignRegistrationRequest = Objects.requireNonNull( + numbersUpdateCampaignRegistrationRequest, + "The required parameter 'numbersUpdateCampaignRegistrationRequest' is missing."); + } + + /** + * Executes the addNumbers request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition addNumbersDefinition = + addNumbersDefinition(campaignId, numbersUpdateCampaignRegistrationRequest); + apiClient.execute(addNumbersDefinition); + } + + /** + * Executes the addNumbers request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition addNumbersDefinition = + addNumbersDefinition(campaignId, numbersUpdateCampaignRegistrationRequest); + return apiClient.executeAsync(addNumbersDefinition, callback); + } + } + + /** + * Add Numbers to Registered Campaign. + *

+ * Adds numbers to campaign that has already been registered. If the campaign registration has not been completed or numbers size exceeds the limit, attempting to update via this api will result in a 400 Bad Request. Numbers which require OSR to be updated in advance could be identified by using Numbers API's \"List owned number\" GET endpoint. + * + * @param campaignId The ID of the desired campaign. (required) + * @param numbersUpdateCampaignRegistrationRequest (required) + * @return AddNumbersRequest + */ + public AddNumbersRequest addNumbers( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + return new AddNumbersRequest(campaignId, numbersUpdateCampaignRegistrationRequest); + } + + private RequestDefinition appealCampaignDefinition(UUID campaignId, NumbersAppealRequest numbersAppealRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/{campaignId}/appeal") + .body(numbersAppealRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * appealCampaign request builder class. + */ + public class AppealCampaignRequest { + private final UUID campaignId; + private final NumbersAppealRequest numbersAppealRequest; + + private AppealCampaignRequest(UUID campaignId, NumbersAppealRequest numbersAppealRequest) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + this.numbersAppealRequest = Objects.requireNonNull( + numbersAppealRequest, "The required parameter 'numbersAppealRequest' is missing."); + } + + /** + * Executes the appealCampaign request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition appealCampaignDefinition = appealCampaignDefinition(campaignId, numbersAppealRequest); + apiClient.execute(appealCampaignDefinition); + } + + /** + * Executes the appealCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition appealCampaignDefinition = appealCampaignDefinition(campaignId, numbersAppealRequest); + return apiClient.executeAsync(appealCampaignDefinition, callback); + } + } + + /** + * Appeal Campaign. + *

+ * Appeals a rejected 10DLC campaign within the Infobip platform. Campaigns are eligible for appeal if they were rejected within the past 3 months and can be appealed up to five times. + * + * @param campaignId The ID of the desired campaign. (required) + * @param numbersAppealRequest (required) + * @return AppealCampaignRequest + */ + public AppealCampaignRequest appealCampaign(UUID campaignId, NumbersAppealRequest numbersAppealRequest) { + return new AppealCampaignRequest(campaignId, numbersAppealRequest); + } + + private RequestDefinition attachNumberPoolDefinition( + UUID campaignId, NumbersAttachNumberPoolRequest numbersAttachNumberPoolRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/{campaignId}/number-pool/attach") + .body(numbersAttachNumberPoolRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * attachNumberPool request builder class. + */ + public class AttachNumberPoolRequest { + private final UUID campaignId; + private final NumbersAttachNumberPoolRequest numbersAttachNumberPoolRequest; + + private AttachNumberPoolRequest( + UUID campaignId, NumbersAttachNumberPoolRequest numbersAttachNumberPoolRequest) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + this.numbersAttachNumberPoolRequest = Objects.requireNonNull( + numbersAttachNumberPoolRequest, + "The required parameter 'numbersAttachNumberPoolRequest' is missing."); + } + + /** + * Executes the attachNumberPool request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition attachNumberPoolDefinition = + attachNumberPoolDefinition(campaignId, numbersAttachNumberPoolRequest); + apiClient.execute(attachNumberPoolDefinition); + } + + /** + * Executes the attachNumberPool request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition attachNumberPoolDefinition = + attachNumberPoolDefinition(campaignId, numbersAttachNumberPoolRequest); + return apiClient.executeAsync(attachNumberPoolDefinition, callback); + } + } + + /** + * Attach Number Pool to Campaign. + *

+ * Associates an existing number pool with a campaign. Number pooling is required when a campaign utilizes more than 49 numbers. This is common in high-throughput environments such as call centers. Attaching a number pool ensures proper provisioning and compliance with carrier requirements. + * + * @param campaignId The ID of the desired campaign. (required) + * @param numbersAttachNumberPoolRequest (required) + * @return AttachNumberPoolRequest + */ + public AttachNumberPoolRequest attachNumberPool( + UUID campaignId, NumbersAttachNumberPoolRequest numbersAttachNumberPoolRequest) { + return new AttachNumberPoolRequest(campaignId, numbersAttachNumberPoolRequest); + } + + private RequestDefinition brandAuthVerificationDefinition(UUID brandId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/brands/{brandId}/brand-auth-verification") + .requiresAuthentication(true) + .accept("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * brandAuthVerification request builder class. + */ + public class BrandAuthVerificationRequest { + private final UUID brandId; + + private BrandAuthVerificationRequest(UUID brandId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + } + + /** + * Executes the brandAuthVerification request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition brandAuthVerificationDefinition = brandAuthVerificationDefinition(brandId); + apiClient.execute(brandAuthVerificationDefinition); + } + + /** + * Executes the brandAuthVerification request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition brandAuthVerificationDefinition = brandAuthVerificationDefinition(brandId); + return apiClient.executeAsync(brandAuthVerificationDefinition, callback); + } + } + + /** + * Request Brand Authentication+ Verification. + *

+ * Request brand authentication+ verification to finalize brand registration process. This operation can be executed for TENDLC_PUBLIC_COMPANY brand type only when Brand authentication is not in progress. + * + * @param brandId The ID of the desired brand. (required) + * @return BrandAuthVerificationRequest + */ + public BrandAuthVerificationRequest brandAuthVerification(UUID brandId) { + return new BrandAuthVerificationRequest(brandId); + } + + private RequestDefinition cancelNumberDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder("DELETE", "/numbers/1/numbers/{numberKey}") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * cancelNumber request builder class. + */ + public class CancelNumberRequest { + private final String numberKey; + + private CancelNumberRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the cancelNumber request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition cancelNumberDefinition = cancelNumberDefinition(numberKey); + apiClient.execute(cancelNumberDefinition); + } + + /** + * Executes the cancelNumber request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition cancelNumberDefinition = cancelNumberDefinition(numberKey); + return apiClient.executeAsync(cancelNumberDefinition, callback); + } + } + + /** + * Cancel number. + *

+ * This method will cancel your purchased number. The number you cancel will become available in the numbers pool for anyone to buy. + * + * @param numberKey Unique ID of a number. (required) + * @return CancelNumberRequest + * @see Read more about canceling a number + */ + public CancelNumberRequest cancelNumber(String numberKey) { + return new CancelNumberRequest(numberKey); + } + + private RequestDefinition createBrandDefinition(NumbersBrand numbersBrand) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/number-registration/1/brands") + .body(numbersBrand) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * createBrand request builder class. + */ + public class CreateBrandRequest { + private final NumbersBrand numbersBrand; + + private CreateBrandRequest(NumbersBrand numbersBrand) { + this.numbersBrand = + Objects.requireNonNull(numbersBrand, "The required parameter 'numbersBrand' is missing."); + } + + /** + * Executes the createBrand request. + * + * @return NumbersBrand The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersBrand execute() throws ApiException { + RequestDefinition createBrandDefinition = createBrandDefinition(numbersBrand); + return apiClient.execute(createBrandDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the createBrand request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition createBrandDefinition = createBrandDefinition(numbersBrand); + return apiClient.executeAsync( + createBrandDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Create Brand. + *

+ * Creates a brand within the Infobip platform. This operation does not register the brand with any registrars. Registration can be done using created brand's ID with the 'Register Brand' endpoint. + * + * @param numbersBrand (required) + * @return CreateBrandRequest + */ + public CreateBrandRequest createBrand(NumbersBrand numbersBrand) { + return new CreateBrandRequest(numbersBrand); + } + + private RequestDefinition createCampaignDefinition(NumbersCampaign numbersCampaign) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/number-registration/1/campaigns") + .body(numbersCampaign) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * createCampaign request builder class. + */ + public class CreateCampaignRequest { + private final NumbersCampaign numbersCampaign; + + private CreateCampaignRequest(NumbersCampaign numbersCampaign) { + this.numbersCampaign = + Objects.requireNonNull(numbersCampaign, "The required parameter 'numbersCampaign' is missing."); + } + + /** + * Executes the createCampaign request. + * + * @return NumbersCampaign The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersCampaign execute() throws ApiException { + RequestDefinition createCampaignDefinition = createCampaignDefinition(numbersCampaign); + return apiClient.execute(createCampaignDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the createCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition createCampaignDefinition = createCampaignDefinition(numbersCampaign); + return apiClient.executeAsync( + createCampaignDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Create Campaign. + *

+ * Creates a campaign within the Infobip platform. This operation does not register the campaign with any networks. Registration can be done using created campaign's ID with the 'Register Campaign' endpoint. + * + * @param numbersCampaign (required) + * @return CreateCampaignRequest + */ + public CreateCampaignRequest createCampaign(NumbersCampaign numbersCampaign) { + return new CreateCampaignRequest(numbersCampaign); + } + + private RequestDefinition createCnamDefinition(String numberKey, CallsCnam callsCnam) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/numbers/2/numbers/{numberKey}/voice/cnam") + .body(callsCnam) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * createCnam request builder class. + */ + public class CreateCnamRequest { + private final String numberKey; + private final CallsCnam callsCnam; + + private CreateCnamRequest(String numberKey, CallsCnam callsCnam) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + this.callsCnam = Objects.requireNonNull(callsCnam, "The required parameter 'callsCnam' is missing."); + } + + /** + * Executes the createCnam request. + * + * @return CallsCnam The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsCnam execute() throws ApiException { + RequestDefinition createCnamDefinition = createCnamDefinition(numberKey, callsCnam); + return apiClient.execute(createCnamDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the createCnam request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition createCnamDefinition = createCnamDefinition(numberKey, callsCnam); + return apiClient.executeAsync(createCnamDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Create CNAM. + *

+ * Create CNAM configuration. This is currently available only for United States and Canada numbers. + * + * @param numberKey Unique ID of a number. (required) + * @param callsCnam (required) + * @return CreateCnamRequest + */ + public CreateCnamRequest createCnam(String numberKey, CallsCnam callsCnam) { + return new CreateCnamRequest(numberKey, callsCnam); + } + + private RequestDefinition createEmergencyServiceDefinition( + String numberKey, CallsEmergencyAddress callsEmergencyAddress) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/numbers/2/numbers/{numberKey}/voice/emergency-service") + .body(callsEmergencyAddress) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * createEmergencyService request builder class. + */ + public class CreateEmergencyServiceRequest { + private final String numberKey; + private final CallsEmergencyAddress callsEmergencyAddress; + + private CreateEmergencyServiceRequest(String numberKey, CallsEmergencyAddress callsEmergencyAddress) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + this.callsEmergencyAddress = Objects.requireNonNull( + callsEmergencyAddress, "The required parameter 'callsEmergencyAddress' is missing."); + } + + /** + * Executes the createEmergencyService request. + * + * @return CallsEmergencyAddress The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsEmergencyAddress execute() throws ApiException { + RequestDefinition createEmergencyServiceDefinition = + createEmergencyServiceDefinition(numberKey, callsEmergencyAddress); + return apiClient.execute( + createEmergencyServiceDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the createEmergencyService request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition createEmergencyServiceDefinition = + createEmergencyServiceDefinition(numberKey, callsEmergencyAddress); + return apiClient.executeAsync( + createEmergencyServiceDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Create Emergency Service Address. + *

+ * Create Emergency Service Address Emergency Service Address allows you to set any physical address in the United States as your address to be transmitted on emergency number calls. This means your calls to the emergency number will route to the closest PSAP (Public Safety Answering Point) to your registered address on our system. That address will also appear on the emergency services operator’s screen when you call. + * + * @param numberKey Unique ID of a number. (required) + * @param callsEmergencyAddress (required) + * @return CreateEmergencyServiceRequest + */ + public CreateEmergencyServiceRequest createEmergencyService( + String numberKey, CallsEmergencyAddress callsEmergencyAddress) { + return new CreateEmergencyServiceRequest(numberKey, callsEmergencyAddress); + } + + private RequestDefinition createRecordingConfigurationDefinition( + NumbersNumberConfigurationModel numbersNumberConfigurationModel) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/voice/recording/1/configuration/numbers") + .body(numbersNumberConfigurationModel) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * createRecordingConfiguration request builder class. + */ + public class CreateRecordingConfigurationRequest { + private final NumbersNumberConfigurationModel numbersNumberConfigurationModel; + + private CreateRecordingConfigurationRequest(NumbersNumberConfigurationModel numbersNumberConfigurationModel) { + this.numbersNumberConfigurationModel = Objects.requireNonNull( + numbersNumberConfigurationModel, + "The required parameter 'numbersNumberConfigurationModel' is missing."); + } + + /** + * Executes the createRecordingConfiguration request. + * + * @return NumbersNumberConfigurationModel The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersNumberConfigurationModel execute() throws ApiException { + RequestDefinition createRecordingConfigurationDefinition = + createRecordingConfigurationDefinition(numbersNumberConfigurationModel); + return apiClient.execute( + createRecordingConfigurationDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the createRecordingConfiguration request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition createRecordingConfigurationDefinition = + createRecordingConfigurationDefinition(numbersNumberConfigurationModel); + return apiClient.executeAsync( + createRecordingConfigurationDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Create voice recording configuration. + *

+ * This method allows you to set up recording configuration for the Voice number that has a `Forward to phone` or `Forward to IP` action enabled. Once you purchase a Voice number and attach a voice action to it, you can make additional recording configuration. Enabling recording on a Voice number means that each call made on this number will be recorded. By default, the recording is disabled on all numbers. **NOTE** Changing an action on a number doesn't disable the recording feature. + * + * @param numbersNumberConfigurationModel (required) + * @return CreateRecordingConfigurationRequest + */ + public CreateRecordingConfigurationRequest createRecordingConfiguration( + NumbersNumberConfigurationModel numbersNumberConfigurationModel) { + return new CreateRecordingConfigurationRequest(numbersNumberConfigurationModel); + } + + private RequestDefinition createTollFreeCampaignDefinition( + NumbersTollFreeUnifiedNumberCampaignApiModel numbersTollFreeUnifiedNumberCampaignApiModel) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/toll-free") + .body(numbersTollFreeUnifiedNumberCampaignApiModel) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * createTollFreeCampaign request builder class. + */ + public class CreateTollFreeCampaignRequest { + private final NumbersTollFreeUnifiedNumberCampaignApiModel numbersTollFreeUnifiedNumberCampaignApiModel; + + private CreateTollFreeCampaignRequest( + NumbersTollFreeUnifiedNumberCampaignApiModel numbersTollFreeUnifiedNumberCampaignApiModel) { + this.numbersTollFreeUnifiedNumberCampaignApiModel = Objects.requireNonNull( + numbersTollFreeUnifiedNumberCampaignApiModel, + "The required parameter 'numbersTollFreeUnifiedNumberCampaignApiModel' is missing."); + } + + /** + * Executes the createTollFreeCampaign request. + * + * @return NumbersTollFreeUnifiedNumberCampaignApiModel The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel execute() throws ApiException { + RequestDefinition createTollFreeCampaignDefinition = + createTollFreeCampaignDefinition(numbersTollFreeUnifiedNumberCampaignApiModel); + return apiClient.execute( + createTollFreeCampaignDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the createTollFreeCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition createTollFreeCampaignDefinition = + createTollFreeCampaignDefinition(numbersTollFreeUnifiedNumberCampaignApiModel); + return apiClient.executeAsync( + createTollFreeCampaignDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Create Toll Free Campaign. + *

+ * Creates a toll free campaign within the Infobip platform. + * + * @param numbersTollFreeUnifiedNumberCampaignApiModel (required) + * @return CreateTollFreeCampaignRequest + */ + public CreateTollFreeCampaignRequest createTollFreeCampaign( + NumbersTollFreeUnifiedNumberCampaignApiModel numbersTollFreeUnifiedNumberCampaignApiModel) { + return new CreateTollFreeCampaignRequest(numbersTollFreeUnifiedNumberCampaignApiModel); + } + + private RequestDefinition createVoiceSetupOnNumberDefinition( + String numberKey, NumbersVoiceSetup numbersVoiceSetup) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/numbers/2/numbers/{numberKey}/voice") + .body(numbersVoiceSetup) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * createVoiceSetupOnNumber request builder class. + */ + public class CreateVoiceSetupOnNumberRequest { + private final String numberKey; + private final NumbersVoiceSetup numbersVoiceSetup; + + private CreateVoiceSetupOnNumberRequest(String numberKey, NumbersVoiceSetup numbersVoiceSetup) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + this.numbersVoiceSetup = + Objects.requireNonNull(numbersVoiceSetup, "The required parameter 'numbersVoiceSetup' is missing."); + } + + /** + * Executes the createVoiceSetupOnNumber request. + * + * @return NumbersVoiceSetup The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersVoiceSetup execute() throws ApiException { + RequestDefinition createVoiceSetupOnNumberDefinition = + createVoiceSetupOnNumberDefinition(numberKey, numbersVoiceSetup); + return apiClient.execute( + createVoiceSetupOnNumberDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the createVoiceSetupOnNumber request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition createVoiceSetupOnNumberDefinition = + createVoiceSetupOnNumberDefinition(numberKey, numbersVoiceSetup); + return apiClient.executeAsync( + createVoiceSetupOnNumberDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Create voice setup on number. + *

+ * This method will create a new voice setup on a number. There can be only one voice action set for the number. + * + * @param numberKey Unique ID of a number. (required) + * @param numbersVoiceSetup voiceSetupRequest (required) + * @return CreateVoiceSetupOnNumberRequest + */ + public CreateVoiceSetupOnNumberRequest createVoiceSetupOnNumber( + String numberKey, NumbersVoiceSetup numbersVoiceSetup) { + return new CreateVoiceSetupOnNumberRequest(numberKey, numbersVoiceSetup); + } + + private RequestDefinition deleteBrandDefinition(UUID brandId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "DELETE", "/number-registration/1/brands/{brandId}") + .requiresAuthentication(true) + .accept("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * deleteBrand request builder class. + */ + public class DeleteBrandRequest { + private final UUID brandId; + + private DeleteBrandRequest(UUID brandId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + } + + /** + * Executes the deleteBrand request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition deleteBrandDefinition = deleteBrandDefinition(brandId); + apiClient.execute(deleteBrandDefinition); + } + + /** + * Executes the deleteBrand request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deleteBrandDefinition = deleteBrandDefinition(brandId); + return apiClient.executeAsync(deleteBrandDefinition, callback); + } + } + + /** + * Delete Brand. + *

+ * Removes a previously created brand by its ID. This operation is only supported if all associated campaigns are in a stage that allows deletion (applies to vetted and non-vetted brands). + * + * @param brandId The ID of the brand to delete. (required) + * @return DeleteBrandRequest + */ + public DeleteBrandRequest deleteBrand(UUID brandId) { + return new DeleteBrandRequest(brandId); + } + + private RequestDefinition deleteCampaignDefinition(UUID campaignId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "DELETE", "/number-registration/1/campaigns/{campaignId}") + .requiresAuthentication(true) + .accept("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * deleteCampaign request builder class. + */ + public class DeleteCampaignRequest { + private final UUID campaignId; + + private DeleteCampaignRequest(UUID campaignId) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + } + + /** + * Executes the deleteCampaign request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition deleteCampaignDefinition = deleteCampaignDefinition(campaignId); + apiClient.execute(deleteCampaignDefinition); + } + + /** + * Executes the deleteCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deleteCampaignDefinition = deleteCampaignDefinition(campaignId); + return apiClient.executeAsync(deleteCampaignDefinition, callback); + } + } + + /** + * Delete Campaign. + *

+ * Removes a previously created campaign by its ID. This operation is only supported for campaigns that are in DRAFT, DEREGISTERED or REJECTED stage. + * + * @param campaignId The ID of the campaign to delete. (required) + * @return DeleteCampaignRequest + */ + public DeleteCampaignRequest deleteCampaign(UUID campaignId) { + return new DeleteCampaignRequest(campaignId); + } + + private RequestDefinition deleteCnamDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "DELETE", "/numbers/2/numbers/{numberKey}/voice/cnam") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * deleteCnam request builder class. + */ + public class DeleteCnamRequest { + private final String numberKey; + + private DeleteCnamRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the deleteCnam request. + * + * @return CallsCnam The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsCnam execute() throws ApiException { + RequestDefinition deleteCnamDefinition = deleteCnamDefinition(numberKey); + return apiClient.execute(deleteCnamDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the deleteCnam request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deleteCnamDefinition = deleteCnamDefinition(numberKey); + return apiClient.executeAsync(deleteCnamDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Delete CNAM. + *

+ * Delete CNAM configuration. + * + * @param numberKey Unique ID of a number. (required) + * @return DeleteCnamRequest + */ + public DeleteCnamRequest deleteCnam(String numberKey) { + return new DeleteCnamRequest(numberKey); + } + + private RequestDefinition deleteEmergencyServiceDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "DELETE", "/numbers/2/numbers/{numberKey}/voice/emergency-service") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * deleteEmergencyService request builder class. + */ + public class DeleteEmergencyServiceRequest { + private final String numberKey; + + private DeleteEmergencyServiceRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the deleteEmergencyService request. + * + * @return CallsEmergencyAddress The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsEmergencyAddress execute() throws ApiException { + RequestDefinition deleteEmergencyServiceDefinition = deleteEmergencyServiceDefinition(numberKey); + return apiClient.execute( + deleteEmergencyServiceDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the deleteEmergencyService request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deleteEmergencyServiceDefinition = deleteEmergencyServiceDefinition(numberKey); + return apiClient.executeAsync( + deleteEmergencyServiceDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Delete Emergency Service Address. + *

+ * Delete a Emergency Service Address + * + * @param numberKey Unique ID of a number. (required) + * @return DeleteEmergencyServiceRequest + */ + public DeleteEmergencyServiceRequest deleteEmergencyService(String numberKey) { + return new DeleteEmergencyServiceRequest(numberKey); + } + + private RequestDefinition deleteVoiceSetupOnNumberDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder("DELETE", "/numbers/2/numbers/{numberKey}/voice") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * deleteVoiceSetupOnNumber request builder class. + */ + public class DeleteVoiceSetupOnNumberRequest { + private final String numberKey; + + private DeleteVoiceSetupOnNumberRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the deleteVoiceSetupOnNumber request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition deleteVoiceSetupOnNumberDefinition = deleteVoiceSetupOnNumberDefinition(numberKey); + apiClient.execute(deleteVoiceSetupOnNumberDefinition); + } + + /** + * Executes the deleteVoiceSetupOnNumber request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deleteVoiceSetupOnNumberDefinition = deleteVoiceSetupOnNumberDefinition(numberKey); + return apiClient.executeAsync(deleteVoiceSetupOnNumberDefinition, callback); + } + } + + /** + * Delete voice setup on number. + *

+ * This method removes voice setup from a number. + * + * @param numberKey Unique ID of a number. (required) + * @return DeleteVoiceSetupOnNumberRequest + */ + public DeleteVoiceSetupOnNumberRequest deleteVoiceSetupOnNumber(String numberKey) { + return new DeleteVoiceSetupOnNumberRequest(numberKey); + } + + private RequestDefinition deregisterCampaignDefinition(UUID campaignId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/{campaignId}/deregister") + .requiresAuthentication(true) + .accept("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * deregisterCampaign request builder class. + */ + public class DeregisterCampaignRequest { + private final UUID campaignId; + + private DeregisterCampaignRequest(UUID campaignId) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + } + + /** + * Executes the deregisterCampaign request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition deregisterCampaignDefinition = deregisterCampaignDefinition(campaignId); + apiClient.execute(deregisterCampaignDefinition); + } + + /** + * Executes the deregisterCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deregisterCampaignDefinition = deregisterCampaignDefinition(campaignId); + return apiClient.executeAsync(deregisterCampaignDefinition, callback); + } + } + + /** + * Deregister Campaign. + *

+ * Deregisters the campaign with the given ID with all available networks. + * + * @param campaignId The ID of the desired campaign. (required) + * @return DeregisterCampaignRequest + */ + public DeregisterCampaignRequest deregisterCampaign(UUID campaignId) { + return new DeregisterCampaignRequest(campaignId); + } + + private RequestDefinition detachNumberPoolDefinition(UUID campaignId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/{campaignId}/number-pool/detach") + .requiresAuthentication(true) + .accept("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * detachNumberPool request builder class. + */ + public class DetachNumberPoolRequest { + private final UUID campaignId; + + private DetachNumberPoolRequest(UUID campaignId) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + } + + /** + * Executes the detachNumberPool request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition detachNumberPoolDefinition = detachNumberPoolDefinition(campaignId); + apiClient.execute(detachNumberPoolDefinition); + } + + /** + * Executes the detachNumberPool request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition detachNumberPoolDefinition = detachNumberPoolDefinition(campaignId); + return apiClient.executeAsync(detachNumberPoolDefinition, callback); + } + } + + /** + * Detach Number Pool from Campaign. + *

+ * Detaches an existing number pool from the specified campaign. This operation is subject to validation: the campaign must have fewer than 50 assigned numbers at the time of detachment. + * + * @param campaignId The ID of the desired campaign. (required) + * @return DetachNumberPoolRequest + */ + public DetachNumberPoolRequest detachNumberPool(UUID campaignId) { + return new DetachNumberPoolRequest(campaignId); + } + + private RequestDefinition downloadDocumentContentDefinition(UUID documentId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/documents/{documentId}") + .requiresAuthentication(true) + .accept("application/octet-stream"); + + if (documentId != null) { + builder.addPathParameter(new Parameter("documentId", documentId)); + } + return builder.build(); + } + + /** + * downloadDocumentContent request builder class. + */ + public class DownloadDocumentContentRequest { + private final UUID documentId; + + private DownloadDocumentContentRequest(UUID documentId) { + this.documentId = Objects.requireNonNull(documentId, "The required parameter 'documentId' is missing."); + } + + /** + * Executes the downloadDocumentContent request. + * + * @return File The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public File execute() throws ApiException { + RequestDefinition downloadDocumentContentDefinition = downloadDocumentContentDefinition(documentId); + return apiClient.execute(downloadDocumentContentDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the downloadDocumentContent request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition downloadDocumentContentDefinition = downloadDocumentContentDefinition(documentId); + return apiClient.executeAsync( + downloadDocumentContentDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Download Document. + *

+ * Downloads a document file by its unique identifier. Access to the document is restricted based on account ownership. + * + * @param documentId Unique identifier for the document. (required) + * @return DownloadDocumentContentRequest + */ + public DownloadDocumentContentRequest downloadDocumentContent(UUID documentId) { + return new DownloadDocumentContentRequest(documentId); + } + + private RequestDefinition getAiReviewResultsDefinition(UUID requestUuid) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/automatic-review/{requestUuid}") + .requiresAuthentication(true) + .accept("application/json"); + + if (requestUuid != null) { + builder.addPathParameter(new Parameter("requestUuid", requestUuid)); + } + return builder.build(); + } + + /** + * getAiReviewResults request builder class. + */ + public class GetAiReviewResultsRequest { + private final UUID requestUuid; + + private GetAiReviewResultsRequest(UUID requestUuid) { + this.requestUuid = Objects.requireNonNull(requestUuid, "The required parameter 'requestUuid' is missing."); + } + + /** + * Executes the getAiReviewResults request. + * + * @return NumbersExternalAutomaticReviewResults The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersExternalAutomaticReviewResults execute() throws ApiException { + RequestDefinition getAiReviewResultsDefinition = getAiReviewResultsDefinition(requestUuid); + return apiClient.execute( + getAiReviewResultsDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the getAiReviewResults request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getAiReviewResultsDefinition = getAiReviewResultsDefinition(requestUuid); + return apiClient.executeAsync( + getAiReviewResultsDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get AI Review Results. + *

+ * Retrieves the results of a campaign AI compliance review by its request UUID. Contact your account manager to learn more. + * + * @param requestUuid The UUID of the AI review request. (required) + * @return GetAiReviewResultsRequest + */ + public GetAiReviewResultsRequest getAiReviewResults(UUID requestUuid) { + return new GetAiReviewResultsRequest(requestUuid); + } + + private RequestDefinition getBrandDefinition(UUID brandId) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/number-registration/1/brands/{brandId}") + .requiresAuthentication(true) + .accept("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * getBrand request builder class. + */ + public class GetBrandRequest { + private final UUID brandId; + + private GetBrandRequest(UUID brandId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + } + + /** + * Executes the getBrand request. + * + * @return NumbersBrand The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersBrand execute() throws ApiException { + RequestDefinition getBrandDefinition = getBrandDefinition(brandId); + return apiClient.execute(getBrandDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getBrand request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getBrandDefinition = getBrandDefinition(brandId); + return apiClient.executeAsync(getBrandDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Brand. + *

+ * Retrieves a previously created brand by its ID. + * + * @param brandId The ID of the desired brand. (required) + * @return GetBrandRequest + */ + public GetBrandRequest getBrand(UUID brandId) { + return new GetBrandRequest(brandId); + } + + private RequestDefinition getBrandEnhancedVetReportDefinition(UUID brandId, UUID vetId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/brands/{brandId}/vets/{vetId}/report") + .requiresAuthentication(true) + .accept("application/octet-stream"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + if (vetId != null) { + builder.addPathParameter(new Parameter("vetId", vetId)); + } + return builder.build(); + } + + /** + * getBrandEnhancedVetReport request builder class. + */ + public class GetBrandEnhancedVetReportRequest { + private final UUID brandId; + private final UUID vetId; + + private GetBrandEnhancedVetReportRequest(UUID brandId, UUID vetId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + this.vetId = Objects.requireNonNull(vetId, "The required parameter 'vetId' is missing."); + } + + /** + * Executes the getBrandEnhancedVetReport request. + * + * @return File The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public File execute() throws ApiException { + RequestDefinition getBrandEnhancedVetReportDefinition = getBrandEnhancedVetReportDefinition(brandId, vetId); + return apiClient.execute(getBrandEnhancedVetReportDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getBrandEnhancedVetReport request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getBrandEnhancedVetReportDefinition = getBrandEnhancedVetReportDefinition(brandId, vetId); + return apiClient.executeAsync( + getBrandEnhancedVetReportDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Brand Enhanced Vet Report. + *

+ * Retrieves brand enhanced vet report by given vetId. + * + * @param brandId The ID of the desired brand. (required) + * @param vetId The ID of the desired vet. (required) + * @return GetBrandEnhancedVetReportRequest + */ + public GetBrandEnhancedVetReportRequest getBrandEnhancedVetReport(UUID brandId, UUID vetId) { + return new GetBrandEnhancedVetReportRequest(brandId, vetId); + } + + private RequestDefinition getBrandRegistrarStatusesDefinition(UUID brandId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/brands/{brandId}/registrar-statuses") + .requiresAuthentication(true) + .accept("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * getBrandRegistrarStatuses request builder class. + */ + public class GetBrandRegistrarStatusesRequest { + private final UUID brandId; + + private GetBrandRegistrarStatusesRequest(UUID brandId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + } + + /** + * Executes the getBrandRegistrarStatuses request. + * + * @return List<NumbersBrandStatus> The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public List execute() throws ApiException { + RequestDefinition getBrandRegistrarStatusesDefinition = getBrandRegistrarStatusesDefinition(brandId); + return apiClient.execute( + getBrandRegistrarStatusesDefinition, new TypeReference>() {}.getType()); + } + + /** + * Executes the getBrandRegistrarStatuses request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback> callback) { + RequestDefinition getBrandRegistrarStatusesDefinition = getBrandRegistrarStatusesDefinition(brandId); + return apiClient.executeAsync( + getBrandRegistrarStatusesDefinition, + new TypeReference>() {}.getType(), + callback); + } + } + + /** + * Get Brand Registrar Statuses. + *

+ * Retrieves status of a registered brand for each registrar. + * + * @param brandId The ID of the desired brand. (required) + * @return GetBrandRegistrarStatusesRequest + */ + public GetBrandRegistrarStatusesRequest getBrandRegistrarStatuses(UUID brandId) { + return new GetBrandRegistrarStatusesRequest(brandId); + } + + private RequestDefinition getBrandVetDefinition(UUID brandId, UUID vetId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/brands/{brandId}/vets/{vetId}") + .requiresAuthentication(true) + .accept("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + if (vetId != null) { + builder.addPathParameter(new Parameter("vetId", vetId)); + } + return builder.build(); + } + + /** + * getBrandVet request builder class. + */ + public class GetBrandVetRequest { + private final UUID brandId; + private final UUID vetId; + + private GetBrandVetRequest(UUID brandId, UUID vetId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + this.vetId = Objects.requireNonNull(vetId, "The required parameter 'vetId' is missing."); + } + + /** + * Executes the getBrandVet request. + * + * @return NumbersBrandVet The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersBrandVet execute() throws ApiException { + RequestDefinition getBrandVetDefinition = getBrandVetDefinition(brandId, vetId); + return apiClient.execute(getBrandVetDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getBrandVet request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getBrandVetDefinition = getBrandVetDefinition(brandId, vetId); + return apiClient.executeAsync( + getBrandVetDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Brand Vet. + *

+ * Retrieves brand vet done for the brand with the given ID. + * + * @param brandId The ID of the desired brand. (required) + * @param vetId The ID of the desired vet. (required) + * @return GetBrandVetRequest + */ + public GetBrandVetRequest getBrandVet(UUID brandId, UUID vetId) { + return new GetBrandVetRequest(brandId, vetId); + } + + private RequestDefinition getBrandVetsDefinition(UUID brandId, Integer page, Integer size, List sort) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/brands/{brandId}/vets") + .requiresAuthentication(true) + .accept("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + if (page != null) { + builder.addQueryParameter(new Parameter("page", page)); + } + if (size != null) { + builder.addQueryParameter(new Parameter("size", size)); + } + if (sort != null) { + for (var parameterItem : sort) { + builder.addQueryParameter(new Parameter("sort", parameterItem)); + } + } + return builder.build(); + } + + /** + * getBrandVets request builder class. + */ + public class GetBrandVetsRequest { + private final UUID brandId; + private Integer page; + private Integer size; + private List sort; + + private GetBrandVetsRequest(UUID brandId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + } + + /** + * Sets page. + * + * @param page Results page you want to retrieve (0..N). The default value is 0. (optional) + * @return GetBrandVetsRequest + */ + public GetBrandVetsRequest page(Integer page) { + this.page = page; + return this; + } + + /** + * Sets size. + * + * @param size Number of records per page (0..2000). The default value is 20. The maximum value is 2000. (optional) + * @return GetBrandVetsRequest + */ + public GetBrandVetsRequest size(Integer size) { + this.size = size; + return this; + } + + /** + * Sets sort. + * + * @param sort Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Sortable Properties: 'vetId', 'type', 'vettedDate', 'enhancedVettedDate'. (optional) + * @return GetBrandVetsRequest + */ + public GetBrandVetsRequest sort(List sort) { + this.sort = sort; + return this; + } + + /** + * Executes the getBrandVets request. + * + * @return NumbersPageResponseBrandVet The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersPageResponseBrandVet execute() throws ApiException { + RequestDefinition getBrandVetsDefinition = getBrandVetsDefinition(brandId, page, size, sort); + return apiClient.execute( + getBrandVetsDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getBrandVets request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getBrandVetsDefinition = getBrandVetsDefinition(brandId, page, size, sort); + return apiClient.executeAsync( + getBrandVetsDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Brand Vets. + *

+ * Retrieves all vets done for the brand with the given ID. + * + * @param brandId The ID of the desired brand. (required) + * @return GetBrandVetsRequest + */ + public GetBrandVetsRequest getBrandVets(UUID brandId) { + return new GetBrandVetsRequest(brandId); + } + + private RequestDefinition getBrandsDefinition( + List id, + List type, + String nameLike, + List referenceId, + Integer page, + Integer size, + List sort) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/number-registration/1/brands") + .requiresAuthentication(true) + .accept("application/json"); + + if (id != null) { + for (var parameterItem : id) { + builder.addQueryParameter(new Parameter("id", parameterItem)); + } + } + if (type != null) { + for (var parameterItem : type) { + builder.addQueryParameter(new Parameter("type", parameterItem)); + } + } + if (nameLike != null) { + builder.addQueryParameter(new Parameter("nameLike", nameLike)); + } + if (referenceId != null) { + for (var parameterItem : referenceId) { + builder.addQueryParameter(new Parameter("referenceId", parameterItem)); + } + } + if (page != null) { + builder.addQueryParameter(new Parameter("page", page)); + } + if (size != null) { + builder.addQueryParameter(new Parameter("size", size)); + } + if (sort != null) { + for (var parameterItem : sort) { + builder.addQueryParameter(new Parameter("sort", parameterItem)); + } + } + return builder.build(); + } + + /** + * getBrands request builder class. + */ + public class GetBrandsRequest { + private List id; + private List type; + private String nameLike; + private List referenceId; + private Integer page; + private Integer size; + private List sort; + + private GetBrandsRequest() {} + + /** + * Sets id. + * + * @param id Filters brands to those that match the supplied ID(s). (optional) + * @return GetBrandsRequest + */ + public GetBrandsRequest id(List id) { + this.id = id; + return this; + } + + /** + * Sets type. + * + * @param type Filters brands to those that match the supplied brand types(s). (optional) + * @return GetBrandsRequest + */ + public GetBrandsRequest type(List type) { + this.type = type; + return this; + } + + /** + * Sets nameLike. + * + * @param nameLike Filters brands to those whose names contain the supplied name. (optional) + * @return GetBrandsRequest + */ + public GetBrandsRequest nameLike(String nameLike) { + this.nameLike = nameLike; + return this; + } + + /** + * Sets referenceId. + * + * @param referenceId Filters brands to those that match the supplied referenceId(s). (optional) + * @return GetBrandsRequest + */ + public GetBrandsRequest referenceId(List referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Sets page. + * + * @param page Results page you want to retrieve (0..N). The default value is 0. (optional) + * @return GetBrandsRequest + */ + public GetBrandsRequest page(Integer page) { + this.page = page; + return this; + } + + /** + * Sets size. + * + * @param size Number of records per page (0..2000). The default value is 20. The maximum value is 2000. (optional) + * @return GetBrandsRequest + */ + public GetBrandsRequest size(Integer size) { + this.size = size; + return this; + } + + /** + * Sets sort. + * + * @param sort Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Sortable Properties: 'id', 'name', 'type', 'createdDate', 'lastModifiedDate'. (optional) + * @return GetBrandsRequest + */ + public GetBrandsRequest sort(List sort) { + this.sort = sort; + return this; + } + + /** + * Executes the getBrands request. + * + * @return NumbersPageResponseBrand The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersPageResponseBrand execute() throws ApiException { + RequestDefinition getBrandsDefinition = + getBrandsDefinition(id, type, nameLike, referenceId, page, size, sort); + return apiClient.execute(getBrandsDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getBrands request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getBrandsDefinition = + getBrandsDefinition(id, type, nameLike, referenceId, page, size, sort); + return apiClient.executeAsync( + getBrandsDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Brands. + *

+ * Get a page of brands, using query parameters to filter results. + * + * @return GetBrandsRequest + */ + public GetBrandsRequest getBrands() { + return new GetBrandsRequest(); + } + + private RequestDefinition getCampaignDefinition(UUID campaignId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/campaigns/{campaignId}") + .requiresAuthentication(true) + .accept("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * getCampaign request builder class. + */ + public class GetCampaignRequest { + private final UUID campaignId; + + private GetCampaignRequest(UUID campaignId) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + } + + /** + * Executes the getCampaign request. + * + * @return NumbersCampaign The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersCampaign execute() throws ApiException { + RequestDefinition getCampaignDefinition = getCampaignDefinition(campaignId); + return apiClient.execute(getCampaignDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getCampaignDefinition = getCampaignDefinition(campaignId); + return apiClient.executeAsync( + getCampaignDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Campaign. + *

+ * Retrieves a previously created campaign by its ID. + * + * @param campaignId The ID of the desired campaign. (required) + * @return GetCampaignRequest + */ + public GetCampaignRequest getCampaign(UUID campaignId) { + return new GetCampaignRequest(campaignId); + } + + private RequestDefinition getCampaignNetworkStatusesDefinition(UUID campaignId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/campaigns/{campaignId}/network-statuses") + .requiresAuthentication(true) + .accept("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * getCampaignNetworkStatuses request builder class. + */ + public class GetCampaignNetworkStatusesRequest { + private final UUID campaignId; + + private GetCampaignNetworkStatusesRequest(UUID campaignId) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + } + + /** + * Executes the getCampaignNetworkStatuses request. + * + * @return NumbersNetworkStatus The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersNetworkStatus execute() throws ApiException { + RequestDefinition getCampaignNetworkStatusesDefinition = getCampaignNetworkStatusesDefinition(campaignId); + return apiClient.execute( + getCampaignNetworkStatusesDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getCampaignNetworkStatuses request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getCampaignNetworkStatusesDefinition = getCampaignNetworkStatusesDefinition(campaignId); + return apiClient.executeAsync( + getCampaignNetworkStatusesDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get Campaign Network Statuses. + *

+ * Retrieves status of a registered campaign for each network. + * + * @param campaignId The ID of the desired campaign. (required) + * @return GetCampaignNetworkStatusesRequest + */ + public GetCampaignNetworkStatusesRequest getCampaignNetworkStatuses(UUID campaignId) { + return new GetCampaignNetworkStatusesRequest(campaignId); + } + + private RequestDefinition getCampaignNumbersDefinition(UUID campaignId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/campaigns/{campaignId}/numbers") + .requiresAuthentication(true) + .accept("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * getCampaignNumbers request builder class. + */ + public class GetCampaignNumbersRequest { + private final UUID campaignId; + + private GetCampaignNumbersRequest(UUID campaignId) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + } + + /** + * Executes the getCampaignNumbers request. + * + * @return NumbersNumberPreviews The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersNumberPreviews execute() throws ApiException { + RequestDefinition getCampaignNumbersDefinition = getCampaignNumbersDefinition(campaignId); + return apiClient.execute( + getCampaignNumbersDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getCampaignNumbers request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getCampaignNumbersDefinition = getCampaignNumbersDefinition(campaignId); + return apiClient.executeAsync( + getCampaignNumbersDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Campaign numbers. + *

+ * Retrieves all the numbers associated with a campaign, regardless of the stage, by its ID. + * + * @param campaignId The ID of the campaign for which the numbers should be fetched. (required) + * @return GetCampaignNumbersRequest + */ + public GetCampaignNumbersRequest getCampaignNumbers(UUID campaignId) { + return new GetCampaignNumbersRequest(campaignId); + } + + private RequestDefinition getCampaignPrioritiesDefinition() { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/number-registration/1/campaigns/priorities") + .requiresAuthentication(true) + .accept("application/json"); + + return builder.build(); + } + + /** + * getCampaignPriorities request builder class. + */ + public class GetCampaignPrioritiesRequest { + + private GetCampaignPrioritiesRequest() {} + + /** + * Executes the getCampaignPriorities request. + * + * @return NumbersPriority The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersPriority execute() throws ApiException { + RequestDefinition getCampaignPrioritiesDefinition = getCampaignPrioritiesDefinition(); + return apiClient.execute( + getCampaignPrioritiesDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getCampaignPriorities request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getCampaignPrioritiesDefinition = getCampaignPrioritiesDefinition(); + return apiClient.executeAsync( + getCampaignPrioritiesDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Campaign Priorities. + *

+ * Retrieves campaign priority levels for your account(if applicable). Please contact your account manager to learn more about priorities. + * + * @return GetCampaignPrioritiesRequest + */ + public GetCampaignPrioritiesRequest getCampaignPriorities() { + return new GetCampaignPrioritiesRequest(); + } + + private RequestDefinition getCampaignsDefinition( + List id, + List brandId, + List type, + String nameLike, + List referenceId, + List stage, + List number, + Integer page, + Integer size, + List sort) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/number-registration/1/campaigns") + .requiresAuthentication(true) + .accept("application/json"); + + if (id != null) { + for (var parameterItem : id) { + builder.addQueryParameter(new Parameter("id", parameterItem)); + } + } + if (brandId != null) { + for (var parameterItem : brandId) { + builder.addQueryParameter(new Parameter("brandId", parameterItem)); + } + } + if (type != null) { + for (var parameterItem : type) { + builder.addQueryParameter(new Parameter("type", parameterItem)); + } + } + if (nameLike != null) { + builder.addQueryParameter(new Parameter("nameLike", nameLike)); + } + if (referenceId != null) { + for (var parameterItem : referenceId) { + builder.addQueryParameter(new Parameter("referenceId", parameterItem)); + } + } + if (stage != null) { + for (var parameterItem : stage) { + builder.addQueryParameter(new Parameter("stage", parameterItem)); + } + } + if (number != null) { + for (var parameterItem : number) { + builder.addQueryParameter(new Parameter("number", parameterItem)); + } + } + if (page != null) { + builder.addQueryParameter(new Parameter("page", page)); + } + if (size != null) { + builder.addQueryParameter(new Parameter("size", size)); + } + if (sort != null) { + for (var parameterItem : sort) { + builder.addQueryParameter(new Parameter("sort", parameterItem)); + } + } + return builder.build(); + } + + /** + * getCampaigns request builder class. + */ + public class GetCampaignsRequest { + private List id; + private List brandId; + private List type; + private String nameLike; + private List referenceId; + private List stage; + private List number; + private Integer page; + private Integer size; + private List sort; + + private GetCampaignsRequest() {} + + /** + * Sets id. + * + * @param id Filters campaigns to those that match the supplied ID(s). (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest id(List id) { + this.id = id; + return this; + } + + /** + * Sets brandId. + * + * @param brandId Filters campaigns to those that match the supplied brand ID(s). (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest brandId(List brandId) { + this.brandId = brandId; + return this; + } + + /** + * Sets type. + * + * @param type Filters campaigns to those that match the supplied campaign type(s). (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest type(List type) { + this.type = type; + return this; + } + + /** + * Sets nameLike. + * + * @param nameLike Filters campaigns to those whose names contain the supplied name. (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest nameLike(String nameLike) { + this.nameLike = nameLike; + return this; + } + + /** + * Sets referenceId. + * + * @param referenceId Filters campaigns to those that match the supplied referenceId(s). (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest referenceId(List referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Sets stage. + * + * @param stage Filters campaigns to those that match the campaign stage(s). (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest stage(List stage) { + this.stage = stage; + return this; + } + + /** + * Sets number. + * + * @param number Filters campaigns to those that match the number(s). (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest number(List number) { + this.number = number; + return this; + } + + /** + * Sets page. + * + * @param page Results page you want to retrieve (0..N). The default value is 0. (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest page(Integer page) { + this.page = page; + return this; + } + + /** + * Sets size. + * + * @param size Number of records per page (0..2000). The default value is 20. The maximum value is 2000. (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest size(Integer size) { + this.size = size; + return this; + } + + /** + * Sets sort. + * + * @param sort Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Sortable Properties: 'id', 'name', 'type', 'createdDate', 'lastModifiedDate'. (optional) + * @return GetCampaignsRequest + */ + public GetCampaignsRequest sort(List sort) { + this.sort = sort; + return this; + } + + /** + * Executes the getCampaigns request. + * + * @return NumbersPageResponseCampaign The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersPageResponseCampaign execute() throws ApiException { + RequestDefinition getCampaignsDefinition = + getCampaignsDefinition(id, brandId, type, nameLike, referenceId, stage, number, page, size, sort); + return apiClient.execute( + getCampaignsDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getCampaigns request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getCampaignsDefinition = + getCampaignsDefinition(id, brandId, type, nameLike, referenceId, stage, number, page, size, sort); + return apiClient.executeAsync( + getCampaignsDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Campaigns. + *

+ * Gets a page of campaigns, using query parameters to filter results. + * + * @return GetCampaignsRequest + */ + public GetCampaignsRequest getCampaigns() { + return new GetCampaignsRequest(); + } + + private RequestDefinition getCnamDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/numbers/2/numbers/{numberKey}/voice/cnam") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * getCnam request builder class. + */ + public class GetCnamRequest { + private final String numberKey; + + private GetCnamRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the getCnam request. + * + * @return CallsCnam The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsCnam execute() throws ApiException { + RequestDefinition getCnamDefinition = getCnamDefinition(numberKey); + return apiClient.execute(getCnamDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getCnam request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getCnamDefinition = getCnamDefinition(numberKey); + return apiClient.executeAsync(getCnamDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get CNAM. + *

+ * Get CNAM configuration. + * + * @param numberKey Unique ID of a number. (required) + * @return GetCnamRequest + */ + public GetCnamRequest getCnam(String numberKey) { + return new GetCnamRequest(numberKey); + } + + private RequestDefinition getCnamStatusDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/numbers/2/numbers/{numberKey}/voice/cnam/status") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * getCnamStatus request builder class. + */ + public class GetCnamStatusRequest { + private final String numberKey; + + private GetCnamStatusRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the getCnamStatus request. + * + * @return CallsPublicCnamStatus The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsPublicCnamStatus execute() throws ApiException { + RequestDefinition getCnamStatusDefinition = getCnamStatusDefinition(numberKey); + return apiClient.execute(getCnamStatusDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getCnamStatus request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getCnamStatusDefinition = getCnamStatusDefinition(numberKey); + return apiClient.executeAsync( + getCnamStatusDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get CNAM status. + *

+ * Get a CNAM configuration status. + * + * @param numberKey Unique ID of a number. (required) + * @return GetCnamStatusRequest + */ + public GetCnamStatusRequest getCnamStatus(String numberKey) { + return new GetCnamStatusRequest(numberKey); + } + + private RequestDefinition getEmergencyServiceDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/numbers/2/numbers/{numberKey}/voice/emergency-service") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * getEmergencyService request builder class. + */ + public class GetEmergencyServiceRequest { + private final String numberKey; + + private GetEmergencyServiceRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the getEmergencyService request. + * + * @return CallsEmergencyAddress The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsEmergencyAddress execute() throws ApiException { + RequestDefinition getEmergencyServiceDefinition = getEmergencyServiceDefinition(numberKey); + return apiClient.execute( + getEmergencyServiceDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getEmergencyService request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getEmergencyServiceDefinition = getEmergencyServiceDefinition(numberKey); + return apiClient.executeAsync( + getEmergencyServiceDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get Emergency Service Address. + *

+ * Get a Emergency Service Address + * + * @param numberKey Unique ID of a number. (required) + * @return GetEmergencyServiceRequest + */ + public GetEmergencyServiceRequest getEmergencyService(String numberKey) { + return new GetEmergencyServiceRequest(numberKey); + } + + private RequestDefinition getEmergencyServiceStatusDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/numbers/2/numbers/{numberKey}/voice/emergency-service/status") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * getEmergencyServiceStatus request builder class. + */ + public class GetEmergencyServiceStatusRequest { + private final String numberKey; + + private GetEmergencyServiceStatusRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the getEmergencyServiceStatus request. + * + * @return CallsEmergencyAddressStatus The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsEmergencyAddressStatus execute() throws ApiException { + RequestDefinition getEmergencyServiceStatusDefinition = getEmergencyServiceStatusDefinition(numberKey); + return apiClient.execute( + getEmergencyServiceStatusDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getEmergencyServiceStatus request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getEmergencyServiceStatusDefinition = getEmergencyServiceStatusDefinition(numberKey); + return apiClient.executeAsync( + getEmergencyServiceStatusDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get Emergency Service Address status. + *

+ * Get a Emergency Service Address status. + * + * @param numberKey Unique ID of a number. (required) + * @return GetEmergencyServiceStatusRequest + */ + public GetEmergencyServiceStatusRequest getEmergencyServiceStatus(String numberKey) { + return new GetEmergencyServiceStatusRequest(numberKey); + } + + private RequestDefinition getOwnedNumberPoolsDefinition( + NumbersNumberPoolAvailability availability, String registrarRecordId, Integer page, Integer size) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/number-registration/1/number-pools") + .requiresAuthentication(true) + .accept("application/json"); + + if (availability != null) { + builder.addQueryParameter(new Parameter("availability", availability)); + } + if (registrarRecordId != null) { + builder.addQueryParameter(new Parameter("registrarRecordId", registrarRecordId)); + } + if (page != null) { + builder.addQueryParameter(new Parameter("page", page)); + } + if (size != null) { + builder.addQueryParameter(new Parameter("size", size)); + } + return builder.build(); + } + + /** + * getOwnedNumberPools request builder class. + */ + public class GetOwnedNumberPoolsRequest { + private NumbersNumberPoolAvailability availability; + private String registrarRecordId; + private Integer page; + private Integer size; + + private GetOwnedNumberPoolsRequest() {} + + /** + * Sets availability. + * + * @param availability Filters number pools to those that match the supplied availability. (optional) + * @return GetOwnedNumberPoolsRequest + */ + public GetOwnedNumberPoolsRequest availability(NumbersNumberPoolAvailability availability) { + this.availability = availability; + return this; + } + + /** + * Sets registrarRecordId. + * + * @param registrarRecordId Filters number pools to those that match the supplied referenceId. (optional) + * @return GetOwnedNumberPoolsRequest + */ + public GetOwnedNumberPoolsRequest registrarRecordId(String registrarRecordId) { + this.registrarRecordId = registrarRecordId; + return this; + } + + /** + * Sets page. + * + * @param page Results page you want to retrieve (0..N). The default value is 0. (optional) + * @return GetOwnedNumberPoolsRequest + */ + public GetOwnedNumberPoolsRequest page(Integer page) { + this.page = page; + return this; + } + + /** + * Sets size. + * + * @param size Number of records per page (0..2000). The default value is 10. The maximum value is 1000. (optional) + * @return GetOwnedNumberPoolsRequest + */ + public GetOwnedNumberPoolsRequest size(Integer size) { + this.size = size; + return this; + } + + /** + * Executes the getOwnedNumberPools request. + * + * @return NumbersNumberPoolUsageApiPageResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersNumberPoolUsageApiPageResponse execute() throws ApiException { + RequestDefinition getOwnedNumberPoolsDefinition = + getOwnedNumberPoolsDefinition(availability, registrarRecordId, page, size); + return apiClient.execute( + getOwnedNumberPoolsDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the getOwnedNumberPools request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getOwnedNumberPoolsDefinition = + getOwnedNumberPoolsDefinition(availability, registrarRecordId, page, size); + return apiClient.executeAsync( + getOwnedNumberPoolsDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get Owned Number Pools. + *

+ * Returns a paginated list of number pools owned by the authenticated account. + * + * @return GetOwnedNumberPoolsRequest + */ + public GetOwnedNumberPoolsRequest getOwnedNumberPools() { + return new GetOwnedNumberPoolsRequest(); + } + + private RequestDefinition getSingleOwnedNumberDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/numbers/1/numbers/{numberKey}") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * getSingleOwnedNumber request builder class. + */ + public class GetSingleOwnedNumberRequest { + private final String numberKey; + + private GetSingleOwnedNumberRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the getSingleOwnedNumber request. + * + * @return NumbersNumberResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersNumberResponse execute() throws ApiException { + RequestDefinition getSingleOwnedNumberDefinition = getSingleOwnedNumberDefinition(numberKey); + return apiClient.execute( + getSingleOwnedNumberDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getSingleOwnedNumber request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getSingleOwnedNumberDefinition = getSingleOwnedNumberDefinition(numberKey); + return apiClient.executeAsync( + getSingleOwnedNumberDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get single owned number. + *

+ * Get information about an owned number using the unique ID of the number. + * + * @param numberKey The unique ID of the number for which information is requested. (required) + * @return GetSingleOwnedNumberRequest + */ + public GetSingleOwnedNumberRequest getSingleOwnedNumber(String numberKey) { + return new GetSingleOwnedNumberRequest(numberKey); + } + + private RequestDefinition getVoiceSetupOnNumberDefinition(String numberKey) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/numbers/2/numbers/{numberKey}/voice") + .requiresAuthentication(true) + .accept("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * getVoiceSetupOnNumber request builder class. + */ + public class GetVoiceSetupOnNumberRequest { + private final String numberKey; + + private GetVoiceSetupOnNumberRequest(String numberKey) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + } + + /** + * Executes the getVoiceSetupOnNumber request. + * + * @return NumbersVoiceSetup The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersVoiceSetup execute() throws ApiException { + RequestDefinition getVoiceSetupOnNumberDefinition = getVoiceSetupOnNumberDefinition(numberKey); + return apiClient.execute( + getVoiceSetupOnNumberDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getVoiceSetupOnNumber request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getVoiceSetupOnNumberDefinition = getVoiceSetupOnNumberDefinition(numberKey); + return apiClient.executeAsync( + getVoiceSetupOnNumberDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Get voice setup on number. + *

+ * This method fetches the voice setup on a number. + * + * @param numberKey Unique ID of a number. (required) + * @return GetVoiceSetupOnNumberRequest + */ + public GetVoiceSetupOnNumberRequest getVoiceSetupOnNumber(String numberKey) { + return new GetVoiceSetupOnNumberRequest(numberKey); + } + + private RequestDefinition importExistingBrandVetDefinition( + UUID brandId, NumbersVetImportRequest numbersVetImportRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "PUT", "/number-registration/1/brands/{brandId}/vets/import") + .body(numbersVetImportRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * importExistingBrandVet request builder class. + */ + public class ImportExistingBrandVetRequest { + private final UUID brandId; + private final NumbersVetImportRequest numbersVetImportRequest; + + private ImportExistingBrandVetRequest(UUID brandId, NumbersVetImportRequest numbersVetImportRequest) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + this.numbersVetImportRequest = Objects.requireNonNull( + numbersVetImportRequest, "The required parameter 'numbersVetImportRequest' is missing."); + } + + /** + * Executes the importExistingBrandVet request. + * + * @return NumbersBrandVet The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersBrandVet execute() throws ApiException { + RequestDefinition importExistingBrandVetDefinition = + importExistingBrandVetDefinition(brandId, numbersVetImportRequest); + return apiClient.execute( + importExistingBrandVetDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the importExistingBrandVet request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition importExistingBrandVetDefinition = + importExistingBrandVetDefinition(brandId, numbersVetImportRequest); + return apiClient.executeAsync( + importExistingBrandVetDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Import Existing Brand Vet. + *

+ * Imports Existing Brand Vet provider + * + * @param brandId The ID of the desired brand. (required) + * @param numbersVetImportRequest (required) + * @return ImportExistingBrandVetRequest + */ + public ImportExistingBrandVetRequest importExistingBrandVet( + UUID brandId, NumbersVetImportRequest numbersVetImportRequest) { + return new ImportExistingBrandVetRequest(brandId, numbersVetImportRequest); + } + + private RequestDefinition listOwnedNumbersDefinition(Integer limit, String number, Integer page) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/numbers/1/numbers") + .requiresAuthentication(true) + .accept("application/json"); + + if (limit != null) { + builder.addQueryParameter(new Parameter("limit", limit)); + } + if (number != null) { + builder.addQueryParameter(new Parameter("number", number)); + } + if (page != null) { + builder.addQueryParameter(new Parameter("page", page)); + } + return builder.build(); + } + + /** + * listOwnedNumbers request builder class. + */ + public class ListOwnedNumbersRequest { + private Integer limit; + private String number; + private Integer page; + + private ListOwnedNumbersRequest() {} + + /** + * Sets limit. + * + * @param limit Number of records returned per page. (optional, default to 50) + * @return ListOwnedNumbersRequest + */ + public ListOwnedNumbersRequest limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Sets number. + * + * @param number Searched number. (optional) + * @return ListOwnedNumbersRequest + */ + public ListOwnedNumbersRequest number(String number) { + this.number = number; + return this; + } + + /** + * Sets page. + * + * @param page Page number. Use with `limit` for paging purposes. (optional, default to 0) + * @return ListOwnedNumbersRequest + */ + public ListOwnedNumbersRequest page(Integer page) { + this.page = page; + return this; + } + + /** + * Executes the listOwnedNumbers request. + * + * @return NumbersResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersResponse execute() throws ApiException { + RequestDefinition listOwnedNumbersDefinition = listOwnedNumbersDefinition(limit, number, page); + return apiClient.execute(listOwnedNumbersDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the listOwnedNumbers request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition listOwnedNumbersDefinition = listOwnedNumbersDefinition(limit, number, page); + return apiClient.executeAsync( + listOwnedNumbersDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * List owned numbers. + *

+ * Use this method to get all the owned numbers for this account. + * + * @return ListOwnedNumbersRequest + */ + public ListOwnedNumbersRequest listOwnedNumbers() { + return new ListOwnedNumbersRequest(); + } + + private RequestDefinition registerBrandDefinition(UUID brandId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/brands/{brandId}/register") + .requiresAuthentication(true) + .accept("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * registerBrand request builder class. + */ + public class RegisterBrandRequest { + private final UUID brandId; + + private RegisterBrandRequest(UUID brandId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + } + + /** + * Executes the registerBrand request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition registerBrandDefinition = registerBrandDefinition(brandId); + apiClient.execute(registerBrandDefinition); + } + + /** + * Executes the registerBrand request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition registerBrandDefinition = registerBrandDefinition(brandId); + return apiClient.executeAsync(registerBrandDefinition, callback); + } + } + + /** + * Register Brand. + *

+ * Registers the brand with the given ID with all available registrars. Each registered brand incurs a cost, consult your contract for pricing details. When registering brands of type TENDLC_PUBLIC_COMPANY brands, brand authentication+ verification are automatically triggered. This is only available for 10DLC Brands + * + * @param brandId The ID of the desired brand. (required) + * @return RegisterBrandRequest + */ + public RegisterBrandRequest registerBrand(UUID brandId) { + return new RegisterBrandRequest(brandId); + } + + private RequestDefinition registerCampaignDefinition( + UUID campaignId, NumbersRegisterCampaignRequest numbersRegisterCampaignRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/{campaignId}/register") + .body(numbersRegisterCampaignRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * registerCampaign request builder class. + */ + public class RegisterCampaignRequest { + private final UUID campaignId; + private final NumbersRegisterCampaignRequest numbersRegisterCampaignRequest; + + private RegisterCampaignRequest( + UUID campaignId, NumbersRegisterCampaignRequest numbersRegisterCampaignRequest) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + this.numbersRegisterCampaignRequest = Objects.requireNonNull( + numbersRegisterCampaignRequest, + "The required parameter 'numbersRegisterCampaignRequest' is missing."); + } + + /** + * Executes the registerCampaign request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition registerCampaignDefinition = + registerCampaignDefinition(campaignId, numbersRegisterCampaignRequest); + apiClient.execute(registerCampaignDefinition); + } + + /** + * Executes the registerCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition registerCampaignDefinition = + registerCampaignDefinition(campaignId, numbersRegisterCampaignRequest); + return apiClient.executeAsync(registerCampaignDefinition, callback); + } + } + + /** + * Submit Campaign. + *

+ * Submits the campaign with the given ID for Infobip review. If a campaign gets approved by Infobip, it will get registered with carriers, and submitted for underlying connectivity provider's review. Each registered campaign incurs a cost, consult your contract for pricing information. + * + * @param campaignId The ID of the desired campaign. (required) + * @param numbersRegisterCampaignRequest (required) + * @return RegisterCampaignRequest + * @see Find out more + */ + public RegisterCampaignRequest registerCampaign( + UUID campaignId, NumbersRegisterCampaignRequest numbersRegisterCampaignRequest) { + return new RegisterCampaignRequest(campaignId, numbersRegisterCampaignRequest); + } + + private RequestDefinition removeNumbersDefinition( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/{campaignId}/remove-numbers") + .body(numbersUpdateCampaignRegistrationRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * removeNumbers request builder class. + */ + public class RemoveNumbersRequest { + private final UUID campaignId; + private final NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest; + + private RemoveNumbersRequest( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + this.numbersUpdateCampaignRegistrationRequest = Objects.requireNonNull( + numbersUpdateCampaignRegistrationRequest, + "The required parameter 'numbersUpdateCampaignRegistrationRequest' is missing."); + } + + /** + * Executes the removeNumbers request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition removeNumbersDefinition = + removeNumbersDefinition(campaignId, numbersUpdateCampaignRegistrationRequest); + apiClient.execute(removeNumbersDefinition); + } + + /** + * Executes the removeNumbers request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition removeNumbersDefinition = + removeNumbersDefinition(campaignId, numbersUpdateCampaignRegistrationRequest); + return apiClient.executeAsync(removeNumbersDefinition, callback); + } + } + + /** + * Remove Numbers from Registered Campaign. + *

+ * Removes numbers from campaign that has already been registered. If the campaign registration has not been completed or numbers size exceeds the limit, attempting to update via this api will result in a 400 Bad Request. + * + * @param campaignId The ID of the desired campaign. (required) + * @param numbersUpdateCampaignRegistrationRequest (required) + * @return RemoveNumbersRequest + */ + public RemoveNumbersRequest removeNumbers( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + return new RemoveNumbersRequest(campaignId, numbersUpdateCampaignRegistrationRequest); + } + + private RequestDefinition removeRecordingConfigurationDefinition(String key) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "DELETE", "/voice/recording/1/configuration/numbers/{key}") + .requiresAuthentication(true) + .accept("application/json"); + + if (key != null) { + builder.addPathParameter(new Parameter("key", key)); + } + return builder.build(); + } + + /** + * removeRecordingConfiguration request builder class. + */ + public class RemoveRecordingConfigurationRequest { + private final String key; + + private RemoveRecordingConfigurationRequest(String key) { + this.key = Objects.requireNonNull(key, "The required parameter 'key' is missing."); + } + + /** + * Executes the removeRecordingConfiguration request. + * + * @return NumbersDownloadResponseModel The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersDownloadResponseModel execute() throws ApiException { + RequestDefinition removeRecordingConfigurationDefinition = removeRecordingConfigurationDefinition(key); + return apiClient.execute( + removeRecordingConfigurationDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the removeRecordingConfiguration request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition removeRecordingConfigurationDefinition = removeRecordingConfigurationDefinition(key); + return apiClient.executeAsync( + removeRecordingConfigurationDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Delete voice recording configuration. + *

+ * This method allows you to delete Voice number recording configuration setup. + * + * @param key Key. (required) + * @return RemoveRecordingConfigurationRequest + */ + public RemoveRecordingConfigurationRequest removeRecordingConfiguration(String key) { + return new RemoveRecordingConfigurationRequest(key); + } + + private RequestDefinition resend2faMailBrandAuthDefinition(UUID brandId) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/brands/{brandId}/resend2fa") + .requiresAuthentication(true) + .accept("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * resend2faMailBrandAuth request builder class. + */ + public class Resend2faMailBrandAuthRequest { + private final UUID brandId; + + private Resend2faMailBrandAuthRequest(UUID brandId) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + } + + /** + * Executes the resend2faMailBrandAuth request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition resend2faMailBrandAuthDefinition = resend2faMailBrandAuthDefinition(brandId); + apiClient.execute(resend2faMailBrandAuthDefinition); + } + + /** + * Executes the resend2faMailBrandAuth request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition resend2faMailBrandAuthDefinition = resend2faMailBrandAuthDefinition(brandId); + return apiClient.executeAsync(resend2faMailBrandAuthDefinition, callback); + } + } + + /** + * Resend 2FA Email For Brand Authentication. + *

+ * Resend 2FA email to proceed with Brand authentication. This operation can be executed for TENDLC_PUBLIC_COMPANY brand type only when Brand authentication is in progress. In 2 hour time window can resend only one 2FA email. + * + * @param brandId The ID of the desired brand. (required) + * @return Resend2faMailBrandAuthRequest + */ + public Resend2faMailBrandAuthRequest resend2faMailBrandAuth(UUID brandId) { + return new Resend2faMailBrandAuthRequest(brandId); + } + + private RequestDefinition retrieveRecordingConfigurationDefinition(String key) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/voice/recording/1/configuration/numbers/{key}") + .requiresAuthentication(true) + .accept("application/json"); + + if (key != null) { + builder.addPathParameter(new Parameter("key", key)); + } + return builder.build(); + } + + /** + * retrieveRecordingConfiguration request builder class. + */ + public class RetrieveRecordingConfigurationRequest { + private final String key; + + private RetrieveRecordingConfigurationRequest(String key) { + this.key = Objects.requireNonNull(key, "The required parameter 'key' is missing."); + } + + /** + * Executes the retrieveRecordingConfiguration request. + * + * @return NumbersNumberConfigurationModel The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersNumberConfigurationModel execute() throws ApiException { + RequestDefinition retrieveRecordingConfigurationDefinition = retrieveRecordingConfigurationDefinition(key); + return apiClient.execute( + retrieveRecordingConfigurationDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the retrieveRecordingConfiguration request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition retrieveRecordingConfigurationDefinition = retrieveRecordingConfigurationDefinition(key); + return apiClient.executeAsync( + retrieveRecordingConfigurationDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get voice recording configuration. + *

+ * This method allows you to read Voice number recording configuration setup. + * + * @param key Key. (required) + * @return RetrieveRecordingConfigurationRequest + */ + public RetrieveRecordingConfigurationRequest retrieveRecordingConfiguration(String key) { + return new RetrieveRecordingConfigurationRequest(key); + } + + private RequestDefinition submitCampaignInfoForAiReviewDefinition(NumbersTenDlcAiReviewRequest body) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/number-registration/1/automatic-review") + .body(body) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * submitCampaignInfoForAiReview request builder class. + */ + public class SubmitCampaignInfoForAiReviewRequest { + private final NumbersTenDlcAiReviewRequest body; + + private SubmitCampaignInfoForAiReviewRequest(NumbersTenDlcAiReviewRequest body) { + this.body = Objects.requireNonNull(body, "The required parameter 'body' is missing."); + } + + /** + * Executes the submitCampaignInfoForAiReview request. + * + * @return NumbersReviewSubmissionResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersReviewSubmissionResponse execute() throws ApiException { + RequestDefinition submitCampaignInfoForAiReviewDefinition = submitCampaignInfoForAiReviewDefinition(body); + return apiClient.execute( + submitCampaignInfoForAiReviewDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the submitCampaignInfoForAiReview request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition submitCampaignInfoForAiReviewDefinition = submitCampaignInfoForAiReviewDefinition(body); + return apiClient.executeAsync( + submitCampaignInfoForAiReviewDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Submit Campaign Info for AI Review. + *

+ * Submits new campaign information for automatic AI compliance review. Returns a request UUID that can be used to fetch the review results. Contact your account manager to learn more. + * + * @param body (required) + * @return SubmitCampaignInfoForAiReviewRequest + */ + public SubmitCampaignInfoForAiReviewRequest submitCampaignInfoForAiReview(NumbersTenDlcAiReviewRequest body) { + return new SubmitCampaignInfoForAiReviewRequest(body); + } + + private RequestDefinition submitExistingCampaignForAiReviewDefinition(UUID campaignUuid) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/automatic-review/campaigns/{campaignUuid}") + .requiresAuthentication(true) + .accept("application/json"); + + if (campaignUuid != null) { + builder.addPathParameter(new Parameter("campaignUuid", campaignUuid)); + } + return builder.build(); + } + + /** + * submitExistingCampaignForAiReview request builder class. + */ + public class SubmitExistingCampaignForAiReviewRequest { + private final UUID campaignUuid; + + private SubmitExistingCampaignForAiReviewRequest(UUID campaignUuid) { + this.campaignUuid = + Objects.requireNonNull(campaignUuid, "The required parameter 'campaignUuid' is missing."); + } + + /** + * Executes the submitExistingCampaignForAiReview request. + * + * @return NumbersReviewSubmissionResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersReviewSubmissionResponse execute() throws ApiException { + RequestDefinition submitExistingCampaignForAiReviewDefinition = + submitExistingCampaignForAiReviewDefinition(campaignUuid); + return apiClient.execute( + submitExistingCampaignForAiReviewDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the submitExistingCampaignForAiReview request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition submitExistingCampaignForAiReviewDefinition = + submitExistingCampaignForAiReviewDefinition(campaignUuid); + return apiClient.executeAsync( + submitExistingCampaignForAiReviewDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Submit Existing Campaign for AI Review. + *

+ * Submits an existing campaign for automatic AI compliance review. Returns a request UUID that can be used to fetch the review results. Contact your account manager to learn more. + * + * @param campaignUuid The UUID assigned to the campaign when it was created or imported into the infobip platform. This identifier is returned during campaign creation. (required) + * @return SubmitExistingCampaignForAiReviewRequest + */ + public SubmitExistingCampaignForAiReviewRequest submitExistingCampaignForAiReview(UUID campaignUuid) { + return new SubmitExistingCampaignForAiReviewRequest(campaignUuid); + } + + private RequestDefinition updateBrandDefinition(UUID brandId, NumbersBrand numbersBrand) { + RequestDefinition.Builder builder = RequestDefinition.builder("PUT", "/number-registration/1/brands/{brandId}") + .body(numbersBrand) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * updateBrand request builder class. + */ + public class UpdateBrandRequest { + private final UUID brandId; + private final NumbersBrand numbersBrand; + + private UpdateBrandRequest(UUID brandId, NumbersBrand numbersBrand) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + this.numbersBrand = + Objects.requireNonNull(numbersBrand, "The required parameter 'numbersBrand' is missing."); + } + + /** + * Executes the updateBrand request. + * + * @return NumbersBrand The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersBrand execute() throws ApiException { + RequestDefinition updateBrandDefinition = updateBrandDefinition(brandId, numbersBrand); + return apiClient.execute(updateBrandDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the updateBrand request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateBrandDefinition = updateBrandDefinition(brandId, numbersBrand); + return apiClient.executeAsync( + updateBrandDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Update Brand. + *

+ * Updates a brand that has not yet been registered within the Infobip platform (response 200) or that has a successful or failed registration (response 202). This method will not support a brand update with pending registration status and will return a 400 Bad Request. Also for successfully registered brands, updates to the legalName, type, taxId, and taxIdIssuingCountry are restricted and will also return a 400 Bad Request. + * + * @param brandId The ID of the desired brand. (required) + * @param numbersBrand (required) + * @return UpdateBrandRequest + */ + public UpdateBrandRequest updateBrand(UUID brandId, NumbersBrand numbersBrand) { + return new UpdateBrandRequest(brandId, numbersBrand); + } + + private RequestDefinition updateBrandVetDefinition(UUID brandId, UUID vetId, NumbersBrandVet numbersBrandVet) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "PUT", "/number-registration/1/brands/{brandId}/vets/{vetId}") + .body(numbersBrandVet) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + if (vetId != null) { + builder.addPathParameter(new Parameter("vetId", vetId)); + } + return builder.build(); + } + + /** + * updateBrandVet request builder class. + */ + public class UpdateBrandVetRequest { + private final UUID brandId; + private final UUID vetId; + private final NumbersBrandVet numbersBrandVet; + + private UpdateBrandVetRequest(UUID brandId, UUID vetId, NumbersBrandVet numbersBrandVet) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + this.vetId = Objects.requireNonNull(vetId, "The required parameter 'vetId' is missing."); + this.numbersBrandVet = + Objects.requireNonNull(numbersBrandVet, "The required parameter 'numbersBrandVet' is missing."); + } + + /** + * Executes the updateBrandVet request. + * + * @return NumbersBrandVet The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersBrandVet execute() throws ApiException { + RequestDefinition updateBrandVetDefinition = updateBrandVetDefinition(brandId, vetId, numbersBrandVet); + return apiClient.execute(updateBrandVetDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the updateBrandVet request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateBrandVetDefinition = updateBrandVetDefinition(brandId, vetId, numbersBrandVet); + return apiClient.executeAsync( + updateBrandVetDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Update Brand Vet. + *

+ * Updates a brand vetting type. Provided vet must be current active standard vet and it may only be updated to an enhanced vet if it was performed within the last 30 days. All other attempts to update a vet are considered an error. + * + * @param brandId The ID of the desired brand. (required) + * @param vetId The ID of the brand active vet. (required) + * @param numbersBrandVet (required) + * @return UpdateBrandVetRequest + */ + public UpdateBrandVetRequest updateBrandVet(UUID brandId, UUID vetId, NumbersBrandVet numbersBrandVet) { + return new UpdateBrandVetRequest(brandId, vetId, numbersBrandVet); + } + + private RequestDefinition updateCampaignDefinition(UUID campaignId, NumbersCampaign numbersCampaign) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "PUT", "/number-registration/1/campaigns/{campaignId}") + .body(numbersCampaign) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * updateCampaign request builder class. + */ + public class UpdateCampaignRequest { + private final UUID campaignId; + private final NumbersCampaign numbersCampaign; + + private UpdateCampaignRequest(UUID campaignId, NumbersCampaign numbersCampaign) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + this.numbersCampaign = + Objects.requireNonNull(numbersCampaign, "The required parameter 'numbersCampaign' is missing."); + } + + /** + * Executes the updateCampaign request. + * + * @return NumbersCampaign The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersCampaign execute() throws ApiException { + RequestDefinition updateCampaignDefinition = updateCampaignDefinition(campaignId, numbersCampaign); + return apiClient.execute(updateCampaignDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the updateCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateCampaignDefinition = updateCampaignDefinition(campaignId, numbersCampaign); + return apiClient.executeAsync( + updateCampaignDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Update Campaign. + *

+ * Updates a campaign that has not yet been registered within the Infobip platform or has been rejected by Infobip. This operation is only supported for campaigns that are in DRAFT or REJECTED stage. + * + * @param campaignId The ID of the desired campaign. (required) + * @param numbersCampaign (required) + * @return UpdateCampaignRequest + */ + public UpdateCampaignRequest updateCampaign(UUID campaignId, NumbersCampaign numbersCampaign) { + return new UpdateCampaignRequest(campaignId, numbersCampaign); + } + + private RequestDefinition updateCnamDefinition(String numberKey, CallsCnam callsCnam) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "PUT", "/numbers/2/numbers/{numberKey}/voice/cnam") + .body(callsCnam) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * updateCnam request builder class. + */ + public class UpdateCnamRequest { + private final String numberKey; + private final CallsCnam callsCnam; + + private UpdateCnamRequest(String numberKey, CallsCnam callsCnam) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + this.callsCnam = Objects.requireNonNull(callsCnam, "The required parameter 'callsCnam' is missing."); + } + + /** + * Executes the updateCnam request. + * + * @return CallsCnam The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsCnam execute() throws ApiException { + RequestDefinition updateCnamDefinition = updateCnamDefinition(numberKey, callsCnam); + return apiClient.execute(updateCnamDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the updateCnam request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateCnamDefinition = updateCnamDefinition(numberKey, callsCnam); + return apiClient.executeAsync(updateCnamDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Update CNAM. + *

+ * Update a CNAM configuration. + * + * @param numberKey Unique ID of a number. (required) + * @param callsCnam (required) + * @return UpdateCnamRequest + */ + public UpdateCnamRequest updateCnam(String numberKey, CallsCnam callsCnam) { + return new UpdateCnamRequest(numberKey, callsCnam); + } + + private RequestDefinition updateEmergencyServiceDefinition( + String numberKey, CallsEmergencyAddress callsEmergencyAddress) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "PUT", "/numbers/2/numbers/{numberKey}/voice/emergency-service") + .body(callsEmergencyAddress) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * updateEmergencyService request builder class. + */ + public class UpdateEmergencyServiceRequest { + private final String numberKey; + private final CallsEmergencyAddress callsEmergencyAddress; + + private UpdateEmergencyServiceRequest(String numberKey, CallsEmergencyAddress callsEmergencyAddress) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + this.callsEmergencyAddress = Objects.requireNonNull( + callsEmergencyAddress, "The required parameter 'callsEmergencyAddress' is missing."); + } + + /** + * Executes the updateEmergencyService request. + * + * @return CallsEmergencyAddress The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsEmergencyAddress execute() throws ApiException { + RequestDefinition updateEmergencyServiceDefinition = + updateEmergencyServiceDefinition(numberKey, callsEmergencyAddress); + return apiClient.execute( + updateEmergencyServiceDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the updateEmergencyService request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateEmergencyServiceDefinition = + updateEmergencyServiceDefinition(numberKey, callsEmergencyAddress); + return apiClient.executeAsync( + updateEmergencyServiceDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Update Emergency Service Address. + *

+ * Update a Emergency Service Address + * + * @param numberKey Unique ID of a number. (required) + * @param callsEmergencyAddress (required) + * @return UpdateEmergencyServiceRequest + */ + public UpdateEmergencyServiceRequest updateEmergencyService( + String numberKey, CallsEmergencyAddress callsEmergencyAddress) { + return new UpdateEmergencyServiceRequest(numberKey, callsEmergencyAddress); + } + + private RequestDefinition updateOwnedNumberDefinition( + String numberKey, NumbersUpdateOwnedNumberRequest numbersUpdateOwnedNumberRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder("PUT", "/numbers/1/numbers/{numberKey}") + .body(numbersUpdateOwnedNumberRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * updateOwnedNumber request builder class. + */ + public class UpdateOwnedNumberRequest { + private final String numberKey; + private final NumbersUpdateOwnedNumberRequest numbersUpdateOwnedNumberRequest; + + private UpdateOwnedNumberRequest( + String numberKey, NumbersUpdateOwnedNumberRequest numbersUpdateOwnedNumberRequest) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + this.numbersUpdateOwnedNumberRequest = Objects.requireNonNull( + numbersUpdateOwnedNumberRequest, + "The required parameter 'numbersUpdateOwnedNumberRequest' is missing."); + } + + /** + * Executes the updateOwnedNumber request. + * + * @return NumbersNumberResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersNumberResponse execute() throws ApiException { + RequestDefinition updateOwnedNumberDefinition = + updateOwnedNumberDefinition(numberKey, numbersUpdateOwnedNumberRequest); + return apiClient.execute( + updateOwnedNumberDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the updateOwnedNumber request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateOwnedNumberDefinition = + updateOwnedNumberDefinition(numberKey, numbersUpdateOwnedNumberRequest); + return apiClient.executeAsync( + updateOwnedNumberDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Update owned number. + *

+ * Use this method to update the application and the entity, if required, that is linked to a number. + * + * @param numberKey Unique ID of a number. (required) + * @param numbersUpdateOwnedNumberRequest (required) + * @return UpdateOwnedNumberRequest + */ + public UpdateOwnedNumberRequest updateOwnedNumber( + String numberKey, NumbersUpdateOwnedNumberRequest numbersUpdateOwnedNumberRequest) { + return new UpdateOwnedNumberRequest(numberKey, numbersUpdateOwnedNumberRequest); + } + + private RequestDefinition updateRecordingConfigurationDefinition( + NumbersNumberConfigurationModel numbersNumberConfigurationModel) { + RequestDefinition.Builder builder = RequestDefinition.builder("PUT", "/voice/recording/1/configuration/numbers") + .body(numbersNumberConfigurationModel) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * updateRecordingConfiguration request builder class. + */ + public class UpdateRecordingConfigurationRequest { + private final NumbersNumberConfigurationModel numbersNumberConfigurationModel; + + private UpdateRecordingConfigurationRequest(NumbersNumberConfigurationModel numbersNumberConfigurationModel) { + this.numbersNumberConfigurationModel = Objects.requireNonNull( + numbersNumberConfigurationModel, + "The required parameter 'numbersNumberConfigurationModel' is missing."); + } + + /** + * Executes the updateRecordingConfiguration request. + * + * @return NumbersNumberConfigurationModel The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersNumberConfigurationModel execute() throws ApiException { + RequestDefinition updateRecordingConfigurationDefinition = + updateRecordingConfigurationDefinition(numbersNumberConfigurationModel); + return apiClient.execute( + updateRecordingConfigurationDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the updateRecordingConfiguration request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateRecordingConfigurationDefinition = + updateRecordingConfigurationDefinition(numbersNumberConfigurationModel); + return apiClient.executeAsync( + updateRecordingConfigurationDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Update voice recording configuration. + *

+ * This method allows you to update recording configuration on voice number. + * + * @param numbersNumberConfigurationModel (required) + * @return UpdateRecordingConfigurationRequest + */ + public UpdateRecordingConfigurationRequest updateRecordingConfiguration( + NumbersNumberConfigurationModel numbersNumberConfigurationModel) { + return new UpdateRecordingConfigurationRequest(numbersNumberConfigurationModel); + } + + private RequestDefinition updateRegisteredCampaignDefinition( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/campaigns/{campaignId}/update-registration") + .body(numbersUpdateCampaignRegistrationRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (campaignId != null) { + builder.addPathParameter(new Parameter("campaignId", campaignId)); + } + return builder.build(); + } + + /** + * updateRegisteredCampaign request builder class. + */ + public class UpdateRegisteredCampaignRequest { + private final UUID campaignId; + private final NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest; + + private UpdateRegisteredCampaignRequest( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + this.campaignId = Objects.requireNonNull(campaignId, "The required parameter 'campaignId' is missing."); + this.numbersUpdateCampaignRegistrationRequest = Objects.requireNonNull( + numbersUpdateCampaignRegistrationRequest, + "The required parameter 'numbersUpdateCampaignRegistrationRequest' is missing."); + } + + /** + * Executes the updateRegisteredCampaign request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition updateRegisteredCampaignDefinition = + updateRegisteredCampaignDefinition(campaignId, numbersUpdateCampaignRegistrationRequest); + apiClient.execute(updateRegisteredCampaignDefinition); + } + + /** + * Executes the updateRegisteredCampaign request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateRegisteredCampaignDefinition = + updateRegisteredCampaignDefinition(campaignId, numbersUpdateCampaignRegistrationRequest); + return apiClient.executeAsync(updateRegisteredCampaignDefinition, callback); + } + } + + /** + * Update Registered Campaign. + *

+ * Updates a campaign that has already been registered. If the campaign registration has not been completed, attempting to update via this api will result in a 400 Bad Request. Numbers which require OSR to be updated in advance could be identified by using Numbers API's \"List owned number\" GET endpoint. + * + * @param campaignId The ID of the desired campaign. (required) + * @param numbersUpdateCampaignRegistrationRequest (required) + * @return UpdateRegisteredCampaignRequest + */ + public UpdateRegisteredCampaignRequest updateRegisteredCampaign( + UUID campaignId, NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest) { + return new UpdateRegisteredCampaignRequest(campaignId, numbersUpdateCampaignRegistrationRequest); + } + + private RequestDefinition updateVoiceSetupOnNumberDefinition( + String numberKey, NumbersVoiceSetup numbersVoiceSetup) { + RequestDefinition.Builder builder = RequestDefinition.builder("PUT", "/numbers/2/numbers/{numberKey}/voice") + .body(numbersVoiceSetup) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * updateVoiceSetupOnNumber request builder class. + */ + public class UpdateVoiceSetupOnNumberRequest { + private final String numberKey; + private final NumbersVoiceSetup numbersVoiceSetup; + + private UpdateVoiceSetupOnNumberRequest(String numberKey, NumbersVoiceSetup numbersVoiceSetup) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + this.numbersVoiceSetup = + Objects.requireNonNull(numbersVoiceSetup, "The required parameter 'numbersVoiceSetup' is missing."); + } + + /** + * Executes the updateVoiceSetupOnNumber request. + * + * @return NumbersVoiceSetup The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersVoiceSetup execute() throws ApiException { + RequestDefinition updateVoiceSetupOnNumberDefinition = + updateVoiceSetupOnNumberDefinition(numberKey, numbersVoiceSetup); + return apiClient.execute( + updateVoiceSetupOnNumberDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the updateVoiceSetupOnNumber request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateVoiceSetupOnNumberDefinition = + updateVoiceSetupOnNumberDefinition(numberKey, numbersVoiceSetup); + return apiClient.executeAsync( + updateVoiceSetupOnNumberDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Update voice setup on number. + *

+ * This method updates voice setup previously created on a number. + * + * @param numberKey Unique ID of a number. (required) + * @param numbersVoiceSetup voiceSetup (required) + * @return UpdateVoiceSetupOnNumberRequest + */ + public UpdateVoiceSetupOnNumberRequest updateVoiceSetupOnNumber( + String numberKey, NumbersVoiceSetup numbersVoiceSetup) { + return new UpdateVoiceSetupOnNumberRequest(numberKey, numbersVoiceSetup); + } + + private RequestDefinition uploadDocumentMetadataDefinition(File document) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/number-registration/1/documents") + .requiresAuthentication(true) + .accept("application/json") + .contentType("multipart/form-data"); + + if (document != null) { + builder.addFormParameter(new Parameter("document", document)); + } + return builder.build(); + } + + /** + * uploadDocumentMetadata request builder class. + */ + public class UploadDocumentMetadataRequest { + private final File document; + + private UploadDocumentMetadataRequest(File document) { + this.document = Objects.requireNonNull(document, "The required parameter 'document' is missing."); + } + + /** + * Executes the uploadDocumentMetadata request. + * + * @return NumbersDocumentMetadata The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersDocumentMetadata execute() throws ApiException { + RequestDefinition uploadDocumentMetadataDefinition = uploadDocumentMetadataDefinition(document); + return apiClient.execute( + uploadDocumentMetadataDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the uploadDocumentMetadata request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition uploadDocumentMetadataDefinition = uploadDocumentMetadataDefinition(document); + return apiClient.executeAsync( + uploadDocumentMetadataDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Upload Document. + *

+ * Uploads a document file to the system and returns the document metadata. The uploaded document can be used for 10DLC campaign registration purposes. Documents not attached to a campaign within 7 days will be automatically deleted. Supported file types: .bmp, .dib, .docx, .gif, .htm, .html, .jpeg, .jpg, .m2a, .m4a, .m4b, .m4p, .m4r, .m4v, .mp1, .mp2, .mp3, .mp4, .mpa, .oga, .ogg, .ogm, .ogv, .ogx, .odt, .pdf, .png, .raw, .rtf, .spx, .tif, .tiff, .txt, .wav, .webm, .xml, Maximum file size: 10MB. + * + * @param document The document file to be uploaded. (required) + * @return UploadDocumentMetadataRequest + */ + public UploadDocumentMetadataRequest uploadDocumentMetadata(File document) { + return new UploadDocumentMetadataRequest(document); + } + + private RequestDefinition validateEmergencyServiceDefinition(String numberKey, CallsAddress callsAddress) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/numbers/2/numbers/{numberKey}/voice/emergency-service/validate-address") + .body(callsAddress) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (numberKey != null) { + builder.addPathParameter(new Parameter("numberKey", numberKey)); + } + return builder.build(); + } + + /** + * validateEmergencyService request builder class. + */ + public class ValidateEmergencyServiceRequest { + private final String numberKey; + private final CallsAddress callsAddress; + + private ValidateEmergencyServiceRequest(String numberKey, CallsAddress callsAddress) { + this.numberKey = Objects.requireNonNull(numberKey, "The required parameter 'numberKey' is missing."); + this.callsAddress = + Objects.requireNonNull(callsAddress, "The required parameter 'callsAddress' is missing."); + } + + /** + * Executes the validateEmergencyService request. + * + * @return CallsValidateAddressResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public CallsValidateAddressResponse execute() throws ApiException { + RequestDefinition validateEmergencyServiceDefinition = + validateEmergencyServiceDefinition(numberKey, callsAddress); + return apiClient.execute( + validateEmergencyServiceDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the validateEmergencyService request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition validateEmergencyServiceDefinition = + validateEmergencyServiceDefinition(numberKey, callsAddress); + return apiClient.executeAsync( + validateEmergencyServiceDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Validate Emergency Service Address. + *

+ * Validate a Emergency Service Address + * + * @param numberKey Unique ID of a number. (required) + * @param callsAddress (required) + * @return ValidateEmergencyServiceRequest + */ + public ValidateEmergencyServiceRequest validateEmergencyService(String numberKey, CallsAddress callsAddress) { + return new ValidateEmergencyServiceRequest(numberKey, callsAddress); + } + + private RequestDefinition vetBrandDefinition(UUID brandId, NumbersBrandVet numbersBrandVet) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/number-registration/1/brands/{brandId}/vets") + .body(numbersBrandVet) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (brandId != null) { + builder.addPathParameter(new Parameter("brandId", brandId)); + } + return builder.build(); + } + + /** + * vetBrand request builder class. + */ + public class VetBrandRequest { + private final UUID brandId; + private final NumbersBrandVet numbersBrandVet; + + private VetBrandRequest(UUID brandId, NumbersBrandVet numbersBrandVet) { + this.brandId = Objects.requireNonNull(brandId, "The required parameter 'brandId' is missing."); + this.numbersBrandVet = + Objects.requireNonNull(numbersBrandVet, "The required parameter 'numbersBrandVet' is missing."); + } + + /** + * Executes the vetBrand request. + * + * @return NumbersBrandVet The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public NumbersBrandVet execute() throws ApiException { + RequestDefinition vetBrandDefinition = vetBrandDefinition(brandId, numbersBrandVet); + return apiClient.execute(vetBrandDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the vetBrand request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition vetBrandDefinition = vetBrandDefinition(brandId, numbersBrandVet); + return apiClient.executeAsync( + vetBrandDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Vet Brand. + *

+ * Vets the brand with the given ID. Vetting a brand may only be performed once every 30 days. Can be created as vet type standard or enhanced. Each vet of a brand incurs a cost, consult your contract for pricing information. + * + * @param brandId The ID of the desired brand. (required) + * @param numbersBrandVet (required) + * @return VetBrandRequest + */ + public VetBrandRequest vetBrand(UUID brandId, NumbersBrandVet numbersBrandVet) { + return new VetBrandRequest(brandId, numbersBrandVet); + } +} diff --git a/src/main/java/com/infobip/api/ResourcesApi.java b/src/main/java/com/infobip/api/ResourcesApi.java new file mode 100644 index 0000000..f6404db --- /dev/null +++ b/src/main/java/com/infobip/api/ResourcesApi.java @@ -0,0 +1,1169 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.api; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.common.annotations.Beta; +import com.infobip.ApiCallback; +import com.infobip.ApiClient; +import com.infobip.ApiException; +import com.infobip.Parameter; +import com.infobip.RequestDefinition; +import com.infobip.model.GetResourceRequest200Response; +import com.infobip.model.ResourcesConfigurationType; +import com.infobip.model.ResourcesDocumentIdentifier; +import com.infobip.model.ResourcesIbResourceCoverageInfo; +import com.infobip.model.ResourcesIbResourceCoverageKey; +import com.infobip.model.ResourcesIbResourcesFilter; +import com.infobip.model.ResourcesIbResourcesResponse; +import com.infobip.model.ResourcesMoConfigurationRequest; +import com.infobip.model.ResourcesMoConfigurationResponse; +import com.infobip.model.ResourcesPageResourceOrderApiDoc; +import com.infobip.model.ResourcesRequirementSpecs; +import com.infobip.model.ResourcesRequirementsLookupBody; +import com.infobip.model.ResourcesResourceOrderIdentifier; +import com.infobip.model.ResourcesResourceOrderStatus; +import com.infobip.model.ResourcesSubmitResourceRequestBody; +import com.infobip.model.ResourcesUpdateResourceOrderRequest; +import java.io.File; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents ResourcesApi API client. + */ +public class ResourcesApi { + + private final ApiClient apiClient; + + /** + * Constructs a new instance of ResourcesApi. + * + * @param apiClient {@link ApiClient} instance to delegate calls to. + */ + public ResourcesApi(ApiClient apiClient) { + this.apiClient = Objects.requireNonNull(apiClient, "ApiClient must not be null!"); + } + + private RequestDefinition cancelResourceRequestDefinition(UUID id) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/resources/1/requests/{id}/cancel") + .requiresAuthentication(true) + .accept("application/json"); + + if (id != null) { + builder.addPathParameter(new Parameter("id", id)); + } + return builder.build(); + } + + /** + * cancelResourceRequest request builder class. + */ + public class CancelResourceRequestRequest { + private final UUID id; + + private CancelResourceRequestRequest(UUID id) { + this.id = Objects.requireNonNull(id, "The required parameter 'id' is missing."); + } + + /** + * Executes the cancelResourceRequest request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition cancelResourceRequestDefinition = cancelResourceRequestDefinition(id); + apiClient.execute(cancelResourceRequestDefinition); + } + + /** + * Executes the cancelResourceRequest request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition cancelResourceRequestDefinition = cancelResourceRequestDefinition(id); + return apiClient.executeAsync(cancelResourceRequestDefinition, callback); + } + } + + /** + * Cancel resource request. + *

+ * **Available to selected accounts only. If you want to start using this request, reach out to support@infobip.com or your Infobip account team.** Cancels an existing resource request with Infobip. Resource request may only be canceled when in UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER status. Limited to ALPHANUMERIC_REGISTRATION, NUMBER_PURCHASE and RCS_SENDER_LAUNCH requests only. + * + * @param id The ID of the resource request. (required) + * @return CancelResourceRequestRequest + */ + @Beta + public CancelResourceRequestRequest cancelResourceRequest(UUID id) { + return new CancelResourceRequestRequest(id); + } + + private RequestDefinition deleteDocumentDefinition(String documentId) { + RequestDefinition.Builder builder = RequestDefinition.builder("DELETE", "/resources/1/documents/{documentId}") + .requiresAuthentication(true) + .accept("application/json"); + + if (documentId != null) { + builder.addPathParameter(new Parameter("documentId", documentId)); + } + return builder.build(); + } + + /** + * deleteDocument request builder class. + */ + public class DeleteDocumentRequest { + private final String documentId; + + private DeleteDocumentRequest(String documentId) { + this.documentId = Objects.requireNonNull(documentId, "The required parameter 'documentId' is missing."); + } + + /** + * Executes the deleteDocument request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition deleteDocumentDefinition = deleteDocumentDefinition(documentId); + apiClient.execute(deleteDocumentDefinition); + } + + /** + * Executes the deleteDocument request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deleteDocumentDefinition = deleteDocumentDefinition(documentId); + return apiClient.executeAsync(deleteDocumentDefinition, callback); + } + } + + /** + * Delete document. + *

+ * Delete a document you have previously uploaded. + * + * @param documentId The ID of the document for deletion. (required) + * @return DeleteDocumentRequest + */ + @Beta + public DeleteDocumentRequest deleteDocument(String documentId) { + return new DeleteDocumentRequest(documentId); + } + + private RequestDefinition deleteInboundConfigurationDefinition(String configurationKey) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "DELETE", "/resource-management/1/inbound-message-configurations/{configurationKey}") + .requiresAuthentication(true) + .accept("application/json"); + + if (configurationKey != null) { + builder.addPathParameter(new Parameter("configurationKey", configurationKey)); + } + return builder.build(); + } + + /** + * deleteInboundConfiguration request builder class. + */ + public class DeleteInboundConfigurationRequest { + private final String configurationKey; + + private DeleteInboundConfigurationRequest(String configurationKey) { + this.configurationKey = + Objects.requireNonNull(configurationKey, "The required parameter 'configurationKey' is missing."); + } + + /** + * Executes the deleteInboundConfiguration request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition deleteInboundConfigurationDefinition = + deleteInboundConfigurationDefinition(configurationKey); + apiClient.execute(deleteInboundConfigurationDefinition); + } + + /** + * Executes the deleteInboundConfiguration request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deleteInboundConfigurationDefinition = + deleteInboundConfigurationDefinition(configurationKey); + return apiClient.executeAsync(deleteInboundConfigurationDefinition, callback); + } + } + + /** + * Delete inbound configuration. + *

+ * This method will delete the configuration. + * + * @param configurationKey Unique ID of configuration. (required) + * @return DeleteInboundConfigurationRequest + * @see Read more about keywords + */ + public DeleteInboundConfigurationRequest deleteInboundConfiguration(String configurationKey) { + return new DeleteInboundConfigurationRequest(configurationKey); + } + + private RequestDefinition downloadDocumentDefinition(String documentId) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/resources/1/documents/{documentId}") + .requiresAuthentication(true) + .accept("application/json"); + + if (documentId != null) { + builder.addPathParameter(new Parameter("documentId", documentId)); + } + return builder.build(); + } + + /** + * downloadDocument request builder class. + */ + public class DownloadDocumentRequest { + private final String documentId; + + private DownloadDocumentRequest(String documentId) { + this.documentId = Objects.requireNonNull(documentId, "The required parameter 'documentId' is missing."); + } + + /** + * Executes the downloadDocument request. + * + * @return File The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public File execute() throws ApiException { + RequestDefinition downloadDocumentDefinition = downloadDocumentDefinition(documentId); + return apiClient.execute(downloadDocumentDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the downloadDocument request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition downloadDocumentDefinition = downloadDocumentDefinition(documentId); + return apiClient.executeAsync(downloadDocumentDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Download document. + *

+ * Download a requirement supporting document (template or sample) or a document you have previously uploaded. + * + * @param documentId The ID of the desired document. (required) + * @return DownloadDocumentRequest + */ + @Beta + public DownloadDocumentRequest downloadDocument(String documentId) { + return new DownloadDocumentRequest(documentId); + } + + private RequestDefinition getInboundConfigurationsDefinition( + ResourcesConfigurationType channel, + String configurationKey, + String number, + String numberKey, + String resource, + String resourceKey, + String keyword, + String countryCode) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/resource-management/1/inbound-message-configurations") + .requiresAuthentication(true) + .accept("application/json"); + + if (configurationKey != null) { + builder.addQueryParameter(new Parameter("configurationKey", configurationKey)); + } + if (number != null) { + builder.addQueryParameter(new Parameter("number", number)); + } + if (numberKey != null) { + builder.addQueryParameter(new Parameter("numberKey", numberKey)); + } + if (resource != null) { + builder.addQueryParameter(new Parameter("resource", resource)); + } + if (resourceKey != null) { + builder.addQueryParameter(new Parameter("resourceKey", resourceKey)); + } + if (keyword != null) { + builder.addQueryParameter(new Parameter("keyword", keyword)); + } + if (channel != null) { + builder.addQueryParameter(new Parameter("channel", channel)); + } + if (countryCode != null) { + builder.addQueryParameter(new Parameter("countryCode", countryCode)); + } + return builder.build(); + } + + /** + * getInboundConfigurations request builder class. + */ + public class GetInboundConfigurationsRequest { + private final ResourcesConfigurationType channel; + private String configurationKey; + private String number; + private String numberKey; + private String resource; + private String resourceKey; + private String keyword; + private String countryCode; + + private GetInboundConfigurationsRequest(ResourcesConfigurationType channel) { + this.channel = Objects.requireNonNull(channel, "The required parameter 'channel' is missing."); + } + + /** + * Sets configurationKey. + * + * @param configurationKey Unique ID of configuration. (optional) + * @return GetInboundConfigurationsRequest + */ + public GetInboundConfigurationsRequest configurationKey(String configurationKey) { + this.configurationKey = configurationKey; + return this; + } + + /** + * Sets number. + * + * @param number (optional) + * @return GetInboundConfigurationsRequest + */ + public GetInboundConfigurationsRequest number(String number) { + this.number = number; + return this; + } + + /** + * Sets numberKey. + * + * @param numberKey Unique ID of a number. (optional) + * @return GetInboundConfigurationsRequest + */ + public GetInboundConfigurationsRequest numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Sets resource. + * + * @param resource (optional) + * @return GetInboundConfigurationsRequest + */ + public GetInboundConfigurationsRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Sets resourceKey. + * + * @param resourceKey Unique ID of a resource. (optional) + * @return GetInboundConfigurationsRequest + */ + public GetInboundConfigurationsRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Sets keyword. + * + * @param keyword Configuration keyword. (optional) + * @return GetInboundConfigurationsRequest + */ + public GetInboundConfigurationsRequest keyword(String keyword) { + this.keyword = keyword; + return this; + } + + /** + * Sets countryCode. + * + * @param countryCode Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). (optional) + * @return GetInboundConfigurationsRequest + */ + public GetInboundConfigurationsRequest countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Executes the getInboundConfigurations request. + * + * @return List<ResourcesMoConfigurationResponse> The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public List execute() throws ApiException { + RequestDefinition getInboundConfigurationsDefinition = getInboundConfigurationsDefinition( + channel, configurationKey, number, numberKey, resource, resourceKey, keyword, countryCode); + return apiClient.execute( + getInboundConfigurationsDefinition, + new TypeReference>() {}.getType()); + } + + /** + * Executes the getInboundConfigurations request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback> callback) { + RequestDefinition getInboundConfigurationsDefinition = getInboundConfigurationsDefinition( + channel, configurationKey, number, numberKey, resource, resourceKey, keyword, countryCode); + return apiClient.executeAsync( + getInboundConfigurationsDefinition, + new TypeReference>() {}.getType(), + callback); + } + } + + /** + * Get inbound configurations. + *

+ * Get all configurations using a filter.<br/> If you want configuration for a specific number or resource, then one of the following parameters is required: <code>number, numberKey, resource</code> or <code>resourceKey</code>.<br/> If you are using <code>configurationKey</code> none of previously mentioned parameters are needed. + * + * @param channel Required if <code>number, numberKey, resource</code> or <code>resourceKey</code> present. (required) + * @return GetInboundConfigurationsRequest + * @see Read more about keywords + */ + public GetInboundConfigurationsRequest getInboundConfigurations(ResourcesConfigurationType channel) { + return new GetInboundConfigurationsRequest(channel); + } + + private RequestDefinition getResourceRequestDefinition(UUID id) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/resources/1/requests/{id}") + .requiresAuthentication(true) + .accept("application/json"); + + if (id != null) { + builder.addPathParameter(new Parameter("id", id)); + } + return builder.build(); + } + + /** + * getResourceRequest request builder class. + */ + public class GetResourceRequestRequest { + private final UUID id; + + private GetResourceRequestRequest(UUID id) { + this.id = Objects.requireNonNull(id, "The required parameter 'id' is missing."); + } + + /** + * Executes the getResourceRequest request. + * + * @return GetResourceRequest200Response The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public GetResourceRequest200Response execute() throws ApiException { + RequestDefinition getResourceRequestDefinition = getResourceRequestDefinition(id); + return apiClient.execute( + getResourceRequestDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getResourceRequest request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getResourceRequestDefinition = getResourceRequestDefinition(id); + return apiClient.executeAsync( + getResourceRequestDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get resource request. + *

+ * Retrieves a previously submitted resource request by its ID. + * + * @param id The ID of the desired resource. (required) + * @return GetResourceRequestRequest + */ + @Beta + public GetResourceRequestRequest getResourceRequest(UUID id) { + return new GetResourceRequestRequest(id); + } + + private RequestDefinition getResourceRequestsDefinition( + List countryCode, + List status, + List type, + Integer page, + Integer size, + List sort) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/resources/1/requests") + .requiresAuthentication(true) + .accept("application/json"); + + if (countryCode != null) { + for (var parameterItem : countryCode) { + builder.addQueryParameter(new Parameter("countryCode", parameterItem)); + } + } + if (status != null) { + for (var parameterItem : status) { + builder.addQueryParameter(new Parameter("status", parameterItem)); + } + } + if (type != null) { + for (var parameterItem : type) { + builder.addQueryParameter(new Parameter("type", parameterItem)); + } + } + if (page != null) { + builder.addQueryParameter(new Parameter("page", page)); + } + if (size != null) { + builder.addQueryParameter(new Parameter("size", size)); + } + if (sort != null) { + for (var parameterItem : sort) { + builder.addQueryParameter(new Parameter("sort", parameterItem)); + } + } + return builder.build(); + } + + /** + * getResourceRequests request builder class. + */ + public class GetResourceRequestsRequest { + private List countryCode; + private List status; + private List type; + private Integer page; + private Integer size; + private List sort; + + private GetResourceRequestsRequest() {} + + /** + * Sets countryCode. + * + * @param countryCode Filters resources to those that match the supplied country code. (optional) + * @return GetResourceRequestsRequest + */ + public GetResourceRequestsRequest countryCode(List countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Sets status. + * + * @param status Filters resources to those that match the resource request status. (optional) + * @return GetResourceRequestsRequest + */ + public GetResourceRequestsRequest status(List status) { + this.status = status; + return this; + } + + /** + * Sets type. + * + * @param type Filters resources to those that match the supplied resource type. (optional) + * @return GetResourceRequestsRequest + */ + public GetResourceRequestsRequest type(List type) { + this.type = type; + return this; + } + + /** + * Sets page. + * + * @param page Results page you want to retrieve (0..N). The default value is 0. (optional) + * @return GetResourceRequestsRequest + */ + public GetResourceRequestsRequest page(Integer page) { + this.page = page; + return this; + } + + /** + * Sets size. + * + * @param size Number of records per page (0..2000). The default value is 20. The maximum value is 2000. (optional) + * @return GetResourceRequestsRequest + */ + public GetResourceRequestsRequest size(Integer size) { + this.size = size; + return this; + } + + /** + * Sets sort. + * + * @param sort Sorting criteria in the format: property(,asc|desc). Default sort order is descending by last modified date. Sortable Properties: 'status', 'requestedDate'. (optional) + * @return GetResourceRequestsRequest + */ + public GetResourceRequestsRequest sort(List sort) { + this.sort = sort; + return this; + } + + /** + * Executes the getResourceRequests request. + * + * @return ResourcesPageResourceOrderApiDoc The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public ResourcesPageResourceOrderApiDoc execute() throws ApiException { + RequestDefinition getResourceRequestsDefinition = + getResourceRequestsDefinition(countryCode, status, type, page, size, sort); + return apiClient.execute( + getResourceRequestsDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the getResourceRequests request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getResourceRequestsDefinition = + getResourceRequestsDefinition(countryCode, status, type, page, size, sort); + return apiClient.executeAsync( + getResourceRequestsDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get resource requests. + *

+ * Gets a page of resource requests, using query parameters to filter results. + * + * @return GetResourceRequestsRequest + */ + @Beta + public GetResourceRequestsRequest getResourceRequests() { + return new GetResourceRequestsRequest(); + } + + private RequestDefinition listResourcesDefinition( + ResourcesIbResourcesFilter resourcesIbResourcesFilter, Integer page, Integer size) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/resources/1/resources") + .body(resourcesIbResourcesFilter) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (page != null) { + builder.addQueryParameter(new Parameter("page", page)); + } + if (size != null) { + builder.addQueryParameter(new Parameter("size", size)); + } + return builder.build(); + } + + /** + * listResources request builder class. + */ + public class ListResourcesRequest { + private final ResourcesIbResourcesFilter resourcesIbResourcesFilter; + private Integer page; + private Integer size; + + private ListResourcesRequest(ResourcesIbResourcesFilter resourcesIbResourcesFilter) { + this.resourcesIbResourcesFilter = Objects.requireNonNull( + resourcesIbResourcesFilter, "The required parameter 'resourcesIbResourcesFilter' is missing."); + } + + /** + * Sets page. + * + * @param page Results page to retrieve (0..N). (optional, default to 0) + * @return ListResourcesRequest + */ + public ListResourcesRequest page(Integer page) { + this.page = page; + return this; + } + + /** + * Sets size. + * + * @param size Number of items per page. (optional, default to 20) + * @return ListResourcesRequest + */ + public ListResourcesRequest size(Integer size) { + this.size = size; + return this; + } + + /** + * Executes the listResources request. + * + * @return ResourcesIbResourcesResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public ResourcesIbResourcesResponse execute() throws ApiException { + RequestDefinition listResourcesDefinition = listResourcesDefinition(resourcesIbResourcesFilter, page, size); + return apiClient.execute( + listResourcesDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the listResources request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition listResourcesDefinition = listResourcesDefinition(resourcesIbResourcesFilter, page, size); + return apiClient.executeAsync( + listResourcesDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Search resources. + *

+ * Search resources already owned by your account, such as senders and usable numbers, using filters. This endpoint does not return available resources for purchase or request, it only lists resources that are currently assigned to you.<br/> Pagination is supported; however, if no pagination arguments are supplied, the full unpaginated result set will be returned. + * + * @param resourcesIbResourcesFilter (required) + * @return ListResourcesRequest + */ + public ListResourcesRequest listResources(ResourcesIbResourcesFilter resourcesIbResourcesFilter) { + return new ListResourcesRequest(resourcesIbResourcesFilter); + } + + private RequestDefinition lookupResourceCoverageDefinition( + ResourcesIbResourceCoverageKey resourcesIbResourceCoverageKey) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/resources/1/coverage-lookup") + .body(resourcesIbResourceCoverageKey) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * lookupResourceCoverage request builder class. + */ + public class LookupResourceCoverageRequest { + private final ResourcesIbResourceCoverageKey resourcesIbResourceCoverageKey; + + private LookupResourceCoverageRequest(ResourcesIbResourceCoverageKey resourcesIbResourceCoverageKey) { + this.resourcesIbResourceCoverageKey = Objects.requireNonNull( + resourcesIbResourceCoverageKey, + "The required parameter 'resourcesIbResourceCoverageKey' is missing."); + } + + /** + * Executes the lookupResourceCoverage request. + * + * @return ResourcesIbResourceCoverageInfo The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public ResourcesIbResourceCoverageInfo execute() throws ApiException { + RequestDefinition lookupResourceCoverageDefinition = + lookupResourceCoverageDefinition(resourcesIbResourceCoverageKey); + return apiClient.execute( + lookupResourceCoverageDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the lookupResourceCoverage request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition lookupResourceCoverageDefinition = + lookupResourceCoverageDefinition(resourcesIbResourceCoverageKey); + return apiClient.executeAsync( + lookupResourceCoverageDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Lookup coverage for a resource. + *

+ * Look up the coverage for a single resource by specifying the resource type, identifier (such as sender name or phone number), and associated country code.<br/> + * + * @param resourcesIbResourceCoverageKey (required) + * @return LookupResourceCoverageRequest + */ + public LookupResourceCoverageRequest lookupResourceCoverage( + ResourcesIbResourceCoverageKey resourcesIbResourceCoverageKey) { + return new LookupResourceCoverageRequest(resourcesIbResourceCoverageKey); + } + + private RequestDefinition manageInboundConfigurationDefinition( + ResourcesMoConfigurationRequest resourcesMoConfigurationRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/resource-management/1/inbound-message-configurations") + .body(resourcesMoConfigurationRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * manageInboundConfiguration request builder class. + */ + public class ManageInboundConfigurationRequest { + private final ResourcesMoConfigurationRequest resourcesMoConfigurationRequest; + + private ManageInboundConfigurationRequest(ResourcesMoConfigurationRequest resourcesMoConfigurationRequest) { + this.resourcesMoConfigurationRequest = Objects.requireNonNull( + resourcesMoConfigurationRequest, + "The required parameter 'resourcesMoConfigurationRequest' is missing."); + } + + /** + * Executes the manageInboundConfiguration request. + * + * @return ResourcesMoConfigurationResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public ResourcesMoConfigurationResponse execute() throws ApiException { + RequestDefinition manageInboundConfigurationDefinition = + manageInboundConfigurationDefinition(resourcesMoConfigurationRequest); + return apiClient.execute( + manageInboundConfigurationDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the manageInboundConfiguration request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition manageInboundConfigurationDefinition = + manageInboundConfigurationDefinition(resourcesMoConfigurationRequest); + return apiClient.executeAsync( + manageInboundConfigurationDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Manage inbound configuration. + *

+ * Create and update configuration details for incoming messages. Each action type and channel will require different parameters. + * + * @param resourcesMoConfigurationRequest (required) + * @return ManageInboundConfigurationRequest + * @see Read more about keywords + */ + public ManageInboundConfigurationRequest manageInboundConfiguration( + ResourcesMoConfigurationRequest resourcesMoConfigurationRequest) { + return new ManageInboundConfigurationRequest(resourcesMoConfigurationRequest); + } + + private RequestDefinition resourcesRequirementsLookupDefinition( + ResourcesRequirementsLookupBody resourcesRequirementsLookupBody) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/resources/1/requirements-lookup") + .body(resourcesRequirementsLookupBody) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * resourcesRequirementsLookup request builder class. + */ + public class ResourcesRequirementsLookupRequest { + private final ResourcesRequirementsLookupBody resourcesRequirementsLookupBody; + + private ResourcesRequirementsLookupRequest(ResourcesRequirementsLookupBody resourcesRequirementsLookupBody) { + this.resourcesRequirementsLookupBody = Objects.requireNonNull( + resourcesRequirementsLookupBody, + "The required parameter 'resourcesRequirementsLookupBody' is missing."); + } + + /** + * Executes the resourcesRequirementsLookup request. + * + * @return ResourcesRequirementSpecs The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public ResourcesRequirementSpecs execute() throws ApiException { + RequestDefinition resourcesRequirementsLookupDefinition = + resourcesRequirementsLookupDefinition(resourcesRequirementsLookupBody); + return apiClient.execute( + resourcesRequirementsLookupDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the resourcesRequirementsLookup request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition resourcesRequirementsLookupDefinition = + resourcesRequirementsLookupDefinition(resourcesRequirementsLookupBody); + return apiClient.executeAsync( + resourcesRequirementsLookupDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get resource requirements. + *

+ * Get a list of requirements needed for requesting a specific resource. + * + * @param resourcesRequirementsLookupBody (required) + * @return ResourcesRequirementsLookupRequest + */ + @Beta + public ResourcesRequirementsLookupRequest resourcesRequirementsLookup( + ResourcesRequirementsLookupBody resourcesRequirementsLookupBody) { + return new ResourcesRequirementsLookupRequest(resourcesRequirementsLookupBody); + } + + private RequestDefinition submitResourceRequestDefinition( + ResourcesSubmitResourceRequestBody resourcesSubmitResourceRequestBody) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/resources/1/requests") + .body(resourcesSubmitResourceRequestBody) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * submitResourceRequest request builder class. + */ + public class SubmitResourceRequestRequest { + private final ResourcesSubmitResourceRequestBody resourcesSubmitResourceRequestBody; + + private SubmitResourceRequestRequest(ResourcesSubmitResourceRequestBody resourcesSubmitResourceRequestBody) { + this.resourcesSubmitResourceRequestBody = Objects.requireNonNull( + resourcesSubmitResourceRequestBody, + "The required parameter 'resourcesSubmitResourceRequestBody' is missing."); + } + + /** + * Executes the submitResourceRequest request. + * + * @return ResourcesResourceOrderIdentifier The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public ResourcesResourceOrderIdentifier execute() throws ApiException { + RequestDefinition submitResourceRequestDefinition = + submitResourceRequestDefinition(resourcesSubmitResourceRequestBody); + return apiClient.execute( + submitResourceRequestDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the submitResourceRequest request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition submitResourceRequestDefinition = + submitResourceRequestDefinition(resourcesSubmitResourceRequestBody); + return apiClient.executeAsync( + submitResourceRequestDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Submit resource request. + *

+ * Submits a resource request with Infobip. Please note that costs may apply. + * + * @param resourcesSubmitResourceRequestBody (required) + * @return SubmitResourceRequestRequest + */ + @Beta + public SubmitResourceRequestRequest submitResourceRequest( + ResourcesSubmitResourceRequestBody resourcesSubmitResourceRequestBody) { + return new SubmitResourceRequestRequest(resourcesSubmitResourceRequestBody); + } + + private RequestDefinition updateResourceRequestDefinition( + UUID id, ResourcesUpdateResourceOrderRequest resourcesUpdateResourceOrderRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder("PATCH", "/resources/1/requests/{id}") + .body(resourcesUpdateResourceOrderRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + if (id != null) { + builder.addPathParameter(new Parameter("id", id)); + } + return builder.build(); + } + + /** + * updateResourceRequest request builder class. + */ + public class UpdateResourceRequestRequest { + private final UUID id; + private final ResourcesUpdateResourceOrderRequest resourcesUpdateResourceOrderRequest; + + private UpdateResourceRequestRequest( + UUID id, ResourcesUpdateResourceOrderRequest resourcesUpdateResourceOrderRequest) { + this.id = Objects.requireNonNull(id, "The required parameter 'id' is missing."); + this.resourcesUpdateResourceOrderRequest = Objects.requireNonNull( + resourcesUpdateResourceOrderRequest, + "The required parameter 'resourcesUpdateResourceOrderRequest' is missing."); + } + + /** + * Executes the updateResourceRequest request. + * + * @return GetResourceRequest200Response The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public GetResourceRequest200Response execute() throws ApiException { + RequestDefinition updateResourceRequestDefinition = + updateResourceRequestDefinition(id, resourcesUpdateResourceOrderRequest); + return apiClient.execute( + updateResourceRequestDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the updateResourceRequest request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition updateResourceRequestDefinition = + updateResourceRequestDefinition(id, resourcesUpdateResourceOrderRequest); + return apiClient.executeAsync( + updateResourceRequestDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Update resource request. + *

+ * **Available to selected accounts only. If you want to start using this request, reach out to support@infobip.com or your Infobip account team.** Updates an existing resource request with Infobip. Resource request may only be updated when in UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER status. Limited to ALPHANUMERIC_REGISTRATION, NUMBER_PURCHASE and RCS_SENDER_LAUNCH requests only. **All requirements data must be provided within the request, not just the incorrect or changed ones.** + * + * @param id The ID of the resource request. (required) + * @param resourcesUpdateResourceOrderRequest (required) + * @return UpdateResourceRequestRequest + */ + @Beta + public UpdateResourceRequestRequest updateResourceRequest( + UUID id, ResourcesUpdateResourceOrderRequest resourcesUpdateResourceOrderRequest) { + return new UpdateResourceRequestRequest(id, resourcesUpdateResourceOrderRequest); + } + + private RequestDefinition uploadDocumentDefinition(File document) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/resources/1/documents") + .requiresAuthentication(true) + .accept("application/json") + .contentType("multipart/form-data"); + + if (document != null) { + builder.addFormParameter(new Parameter("document", document)); + } + return builder.build(); + } + + /** + * uploadDocument request builder class. + */ + public class UploadDocumentRequest { + private final File document; + + private UploadDocumentRequest(File document) { + this.document = Objects.requireNonNull(document, "The required parameter 'document' is missing."); + } + + /** + * Executes the uploadDocument request. + * + * @return ResourcesDocumentIdentifier The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public ResourcesDocumentIdentifier execute() throws ApiException { + RequestDefinition uploadDocumentDefinition = uploadDocumentDefinition(document); + return apiClient.execute( + uploadDocumentDefinition, new TypeReference() {}.getType()); + } + + /** + * Executes the uploadDocument request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition uploadDocumentDefinition = uploadDocumentDefinition(document); + return apiClient.executeAsync( + uploadDocumentDefinition, new TypeReference() {}.getType(), callback); + } + } + + /** + * Upload document. + *

+ * Upload a document prior to providing it as a requirement within a resource request. + * + * @param document The document file you want to upload. Supported file formats: .doc, .docx, .jpg, .jpeg, .png, .pdf, .xls, .xlsx, .mp4, .avi, .mov, .webm (required) + * @return UploadDocumentRequest + */ + @Beta + public UploadDocumentRequest uploadDocument(File document) { + return new UploadDocumentRequest(document); + } +} diff --git a/src/main/java/com/infobip/api/WhatsAppApi.java b/src/main/java/com/infobip/api/WhatsAppApi.java index 394c849..0e548f2 100644 --- a/src/main/java/com/infobip/api/WhatsAppApi.java +++ b/src/main/java/com/infobip/api/WhatsAppApi.java @@ -10,6 +10,7 @@ package com.infobip.api; import com.fasterxml.jackson.core.type.TypeReference; +import com.google.common.annotations.Beta; import com.infobip.ApiCallback; import com.infobip.ApiClient; import com.infobip.ApiException; @@ -20,26 +21,34 @@ import com.infobip.model.WhatsAppBulkMessageInfo; import com.infobip.model.WhatsAppBusinessInfoRequest; import com.infobip.model.WhatsAppBusinessInfoResponse; +import com.infobip.model.WhatsAppCallingPermissionResponse; import com.infobip.model.WhatsAppContactsMessage; import com.infobip.model.WhatsAppDocumentMessage; +import com.infobip.model.WhatsAppEventRequest; import com.infobip.model.WhatsAppIdentityConfirmation; import com.infobip.model.WhatsAppIdentityInfo; import com.infobip.model.WhatsAppImageMessage; import com.infobip.model.WhatsAppInteractiveButtonsMessage; +import com.infobip.model.WhatsAppInteractiveCallPermissionRequestMessage; import com.infobip.model.WhatsAppInteractiveFlowMessage; import com.infobip.model.WhatsAppInteractiveListMessage; import com.infobip.model.WhatsAppInteractiveLocationRequestMessage; +import com.infobip.model.WhatsAppInteractiveMediaCarouselMessage; import com.infobip.model.WhatsAppInteractiveMultiProductMessage; import com.infobip.model.WhatsAppInteractiveOrderDetailsMessage; import com.infobip.model.WhatsAppInteractiveOrderStatusMessage; import com.infobip.model.WhatsAppInteractiveProductMessage; import com.infobip.model.WhatsAppInteractiveUrlButtonMessage; +import com.infobip.model.WhatsAppInteractiveVoiceButtonMessage; import com.infobip.model.WhatsAppLocationMessage; import com.infobip.model.WhatsAppOtpRequest; import com.infobip.model.WhatsAppPayment; import com.infobip.model.WhatsAppPhoneNumberRequest; +import com.infobip.model.WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails; +import com.infobip.model.WhatsAppSenderPublicKeyResponse; import com.infobip.model.WhatsAppSenderQualityResponse; import com.infobip.model.WhatsAppSenderRegistrationResponse; +import com.infobip.model.WhatsAppShareWabaRequest; import com.infobip.model.WhatsAppSingleMessageInfo; import com.infobip.model.WhatsAppStickerMessage; import com.infobip.model.WhatsAppTemplateApiResponse; @@ -50,6 +59,7 @@ import com.infobip.model.WhatsAppUrlDeletionRequest; import com.infobip.model.WhatsAppVerifyCodeRequest; import com.infobip.model.WhatsAppVideoMessage; +import com.infobip.model.WhatsAppWABAConversionEventRequest; import java.io.File; import java.util.List; import java.util.Objects; @@ -419,6 +429,68 @@ public DeleteWhatsAppTemplateRequest deleteWhatsAppTemplate(String sender, Strin return new DeleteWhatsAppTemplateRequest(sender, templateName); } + private RequestDefinition deleteWhatsappIdentityDefinition(String sender, String userNumber) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "DELETE", "/whatsapp/1/{sender}/contacts/{userNumber}/identity") + .requiresAuthentication(true) + .accept("application/json"); + + if (sender != null) { + builder.addPathParameter(new Parameter("sender", sender)); + } + if (userNumber != null) { + builder.addPathParameter(new Parameter("userNumber", userNumber)); + } + return builder.build(); + } + + /** + * deleteWhatsappIdentity request builder class. + */ + public class DeleteWhatsappIdentityRequest { + private final String sender; + private final String userNumber; + + private DeleteWhatsappIdentityRequest(String sender, String userNumber) { + this.sender = Objects.requireNonNull(sender, "The required parameter 'sender' is missing."); + this.userNumber = Objects.requireNonNull(userNumber, "The required parameter 'userNumber' is missing."); + } + + /** + * Executes the deleteWhatsappIdentity request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition deleteWhatsappIdentityDefinition = deleteWhatsappIdentityDefinition(sender, userNumber); + apiClient.execute(deleteWhatsappIdentityDefinition); + } + + /** + * Executes the deleteWhatsappIdentity request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition deleteWhatsappIdentityDefinition = deleteWhatsappIdentityDefinition(sender, userNumber); + return apiClient.executeAsync(deleteWhatsappIdentityDefinition, callback); + } + } + + /** + * Delete identity. + *

+ * Delete stored identity data. After this operation, identity from next message exchange will be treated as confirmed. + * + * @param sender Registered WhatsApp sender number. Must be in international format. (required) + * @param userNumber End user's number. Must be in international format. (required) + * @return DeleteWhatsappIdentityRequest + * @see Learn more. + */ + public DeleteWhatsappIdentityRequest deleteWhatsappIdentity(String sender, String userNumber) { + return new DeleteWhatsappIdentityRequest(sender, userNumber); + } + private RequestDefinition downloadWhatsAppInboundMediaDefinition(String sender, String mediaId) { RequestDefinition.Builder builder = RequestDefinition.builder( "GET", "/whatsapp/1/senders/{sender}/media/{mediaId}") @@ -825,6 +897,77 @@ public GetWhatsappBrazilPaymentStatusRequest getWhatsappBrazilPaymentStatus(Stri return new GetWhatsappBrazilPaymentStatusRequest(sender, paymentId); } + private RequestDefinition getWhatsappCallingPermissionDefinition(String sender, String userNumber) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "GET", "/whatsapp/1/senders/{sender}/calls/{userNumber}/permissions") + .requiresAuthentication(true) + .accept("application/json"); + + if (sender != null) { + builder.addPathParameter(new Parameter("sender", sender)); + } + if (userNumber != null) { + builder.addPathParameter(new Parameter("userNumber", userNumber)); + } + return builder.build(); + } + + /** + * getWhatsappCallingPermission request builder class. + */ + public class GetWhatsappCallingPermissionRequest { + private final String sender; + private final String userNumber; + + private GetWhatsappCallingPermissionRequest(String sender, String userNumber) { + this.sender = Objects.requireNonNull(sender, "The required parameter 'sender' is missing."); + this.userNumber = Objects.requireNonNull(userNumber, "The required parameter 'userNumber' is missing."); + } + + /** + * Executes the getWhatsappCallingPermission request. + * + * @return WhatsAppCallingPermissionResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public WhatsAppCallingPermissionResponse execute() throws ApiException { + RequestDefinition getWhatsappCallingPermissionDefinition = + getWhatsappCallingPermissionDefinition(sender, userNumber); + return apiClient.execute( + getWhatsappCallingPermissionDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the getWhatsappCallingPermission request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getWhatsappCallingPermissionDefinition = + getWhatsappCallingPermissionDefinition(sender, userNumber); + return apiClient.executeAsync( + getWhatsappCallingPermissionDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get calling permission. + *

+ * Get calling permission info of WhatsApp sender for specified end user number, including status, allowed actions, and limitations. + * + * @param sender Registered WhatsApp sender number. Must be in international format. (required) + * @param userNumber End user phone number. Must be in international format. (required) + * @return GetWhatsappCallingPermissionRequest + * @see Learn more about WhatsApp channel and use cases + */ + public GetWhatsappCallingPermissionRequest getWhatsappCallingPermission(String sender, String userNumber) { + return new GetWhatsappCallingPermissionRequest(sender, userNumber); + } + private RequestDefinition getWhatsappSenderBusinessInfoDefinition(String sender) { RequestDefinition.Builder builder = RequestDefinition.builder( "GET", "/whatsapp/1/senders/{sender}/business-info") @@ -947,6 +1090,68 @@ public GetWhatsappSenderBusinessLogoRequest getWhatsappSenderBusinessLogo(String return new GetWhatsappSenderBusinessLogoRequest(sender); } + private RequestDefinition getWhatsappSenderPublicKeyDefinition(String sender) { + RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/whatsapp/1/senders/{sender}/public-key") + .requiresAuthentication(true) + .accept("application/json"); + + if (sender != null) { + builder.addPathParameter(new Parameter("sender", sender)); + } + return builder.build(); + } + + /** + * getWhatsappSenderPublicKey request builder class. + */ + public class GetWhatsappSenderPublicKeyRequest { + private final String sender; + + private GetWhatsappSenderPublicKeyRequest(String sender) { + this.sender = Objects.requireNonNull(sender, "The required parameter 'sender' is missing."); + } + + /** + * Executes the getWhatsappSenderPublicKey request. + * + * @return WhatsAppSenderPublicKeyResponse The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public WhatsAppSenderPublicKeyResponse execute() throws ApiException { + RequestDefinition getWhatsappSenderPublicKeyDefinition = getWhatsappSenderPublicKeyDefinition(sender); + return apiClient.execute( + getWhatsappSenderPublicKeyDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the getWhatsappSenderPublicKey request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition getWhatsappSenderPublicKeyDefinition = getWhatsappSenderPublicKeyDefinition(sender); + return apiClient.executeAsync( + getWhatsappSenderPublicKeyDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Get WhatsApp sender public key. + *

+ * Retrieves the public key for WhatsApp encryption. The public key enables end-to-end encrypted data exchange with WhatsApp, such as in WhatsApp Flows. + * + * @param sender Registered WhatsApp sender number. Must be in international format. (required) + * @return GetWhatsappSenderPublicKeyRequest + * @see Learn more about WhatsApp channel and use cases + */ + public GetWhatsappSenderPublicKeyRequest getWhatsappSenderPublicKey(String sender) { + return new GetWhatsappSenderPublicKeyRequest(sender); + } + private RequestDefinition getWhatsappSendersQualityDefinition(List senders) { RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/whatsapp/1/senders/quality") .requiresAuthentication(true) @@ -2190,6 +2395,142 @@ public SendWhatsAppVideoMessageRequest sendWhatsAppVideoMessage(WhatsAppVideoMes return new SendWhatsAppVideoMessageRequest(whatsAppVideoMessage); } + private RequestDefinition sendWhatsappEventsDefinition(WhatsAppEventRequest whatsAppEventRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/whatsapp/1/events") + .body(whatsAppEventRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * sendWhatsappEvents request builder class. + */ + public class SendWhatsappEventsRequest { + private final WhatsAppEventRequest whatsAppEventRequest; + + private SendWhatsappEventsRequest(WhatsAppEventRequest whatsAppEventRequest) { + this.whatsAppEventRequest = Objects.requireNonNull( + whatsAppEventRequest, "The required parameter 'whatsAppEventRequest' is missing."); + } + + /** + * Executes the sendWhatsappEvents request. + * + * @return WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails execute() throws ApiException { + RequestDefinition sendWhatsappEventsDefinition = sendWhatsappEventsDefinition(whatsAppEventRequest); + return apiClient.execute( + sendWhatsappEventsDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the sendWhatsappEvents request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync( + ApiCallback callback) { + RequestDefinition sendWhatsappEventsDefinition = sendWhatsappEventsDefinition(whatsAppEventRequest); + return apiClient.executeAsync( + sendWhatsappEventsDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Send WhatsApp events. + *

+ * Send WhatsApp events to multiple recipients. + * + * @param whatsAppEventRequest (required) + * @return SendWhatsappEventsRequest + * @see Learn more about WhatsApp channel and use cases + */ + public SendWhatsappEventsRequest sendWhatsappEvents(WhatsAppEventRequest whatsAppEventRequest) { + return new SendWhatsappEventsRequest(whatsAppEventRequest); + } + + private RequestDefinition sendWhatsappInteractiveCallPermissionRequestMessageDefinition( + WhatsAppInteractiveCallPermissionRequestMessage whatsAppInteractiveCallPermissionRequestMessage) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/whatsapp/1/message/interactive/call-permission-request") + .body(whatsAppInteractiveCallPermissionRequestMessage) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * sendWhatsappInteractiveCallPermissionRequestMessage request builder class. + */ + public class SendWhatsappInteractiveCallPermissionRequestMessageRequest { + private final WhatsAppInteractiveCallPermissionRequestMessage whatsAppInteractiveCallPermissionRequestMessage; + + private SendWhatsappInteractiveCallPermissionRequestMessageRequest( + WhatsAppInteractiveCallPermissionRequestMessage whatsAppInteractiveCallPermissionRequestMessage) { + this.whatsAppInteractiveCallPermissionRequestMessage = Objects.requireNonNull( + whatsAppInteractiveCallPermissionRequestMessage, + "The required parameter 'whatsAppInteractiveCallPermissionRequestMessage' is missing."); + } + + /** + * Executes the sendWhatsappInteractiveCallPermissionRequestMessage request. + * + * @return WhatsAppSingleMessageInfo The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public WhatsAppSingleMessageInfo execute() throws ApiException { + RequestDefinition sendWhatsappInteractiveCallPermissionRequestMessageDefinition = + sendWhatsappInteractiveCallPermissionRequestMessageDefinition( + whatsAppInteractiveCallPermissionRequestMessage); + return apiClient.execute( + sendWhatsappInteractiveCallPermissionRequestMessageDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the sendWhatsappInteractiveCallPermissionRequestMessage request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition sendWhatsappInteractiveCallPermissionRequestMessageDefinition = + sendWhatsappInteractiveCallPermissionRequestMessageDefinition( + whatsAppInteractiveCallPermissionRequestMessage); + return apiClient.executeAsync( + sendWhatsappInteractiveCallPermissionRequestMessageDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Send WhatsApp interactive call permission request message. + *

+ * Send an interactive call permission request message to a single recipient. Interactive call permission request messages can only be successfully delivered if the recipient has contacted the business within the last 24 hours, otherwise [template message](#channels/whatsapp/send-whatsapp-template-message) should be used. <br/> The API response will not contain the final delivery status, use [Delivery Reports](#channels/whatsapp/receive-whatsapp-delivery-reports) instead. + * + * @param whatsAppInteractiveCallPermissionRequestMessage (required) + * @return SendWhatsappInteractiveCallPermissionRequestMessageRequest + * @see Learn more about WhatsApp channel and use cases + */ + public SendWhatsappInteractiveCallPermissionRequestMessageRequest + sendWhatsappInteractiveCallPermissionRequestMessage( + WhatsAppInteractiveCallPermissionRequestMessage whatsAppInteractiveCallPermissionRequestMessage) { + return new SendWhatsappInteractiveCallPermissionRequestMessageRequest( + whatsAppInteractiveCallPermissionRequestMessage); + } + private RequestDefinition sendWhatsappInteractiveFlowMessageDefinition( WhatsAppInteractiveFlowMessage whatsAppInteractiveFlowMessage) { RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/whatsapp/1/message/interactive/flow") @@ -2327,6 +2668,75 @@ public SendWhatsappInteractiveLocationRequestMessageRequest sendWhatsappInteract return new SendWhatsappInteractiveLocationRequestMessageRequest(whatsAppInteractiveLocationRequestMessage); } + private RequestDefinition sendWhatsappInteractiveMediaCarouselMessageDefinition( + WhatsAppInteractiveMediaCarouselMessage whatsAppInteractiveMediaCarouselMessage) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/whatsapp/1/message/interactive/media-carousel") + .body(whatsAppInteractiveMediaCarouselMessage) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * sendWhatsappInteractiveMediaCarouselMessage request builder class. + */ + public class SendWhatsappInteractiveMediaCarouselMessageRequest { + private final WhatsAppInteractiveMediaCarouselMessage whatsAppInteractiveMediaCarouselMessage; + + private SendWhatsappInteractiveMediaCarouselMessageRequest( + WhatsAppInteractiveMediaCarouselMessage whatsAppInteractiveMediaCarouselMessage) { + this.whatsAppInteractiveMediaCarouselMessage = Objects.requireNonNull( + whatsAppInteractiveMediaCarouselMessage, + "The required parameter 'whatsAppInteractiveMediaCarouselMessage' is missing."); + } + + /** + * Executes the sendWhatsappInteractiveMediaCarouselMessage request. + * + * @return WhatsAppSingleMessageInfo The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public WhatsAppSingleMessageInfo execute() throws ApiException { + RequestDefinition sendWhatsappInteractiveMediaCarouselMessageDefinition = + sendWhatsappInteractiveMediaCarouselMessageDefinition(whatsAppInteractiveMediaCarouselMessage); + return apiClient.execute( + sendWhatsappInteractiveMediaCarouselMessageDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the sendWhatsappInteractiveMediaCarouselMessage request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition sendWhatsappInteractiveMediaCarouselMessageDefinition = + sendWhatsappInteractiveMediaCarouselMessageDefinition(whatsAppInteractiveMediaCarouselMessage); + return apiClient.executeAsync( + sendWhatsappInteractiveMediaCarouselMessageDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Send WhatsApp interactive media carousel message. + *

+ * Send an interactive media carousel message to a single recipient. Interactive media carousel messages can only be successfully delivered if the recipient has contacted the business within the last 24 hours, otherwise [template message](#channels/whatsapp/send-whatsapp-template-message) should be used. <br/> The API response will not contain the final delivery status, use [Delivery Reports](#channels/whatsapp/receive-whatsapp-delivery-reports) instead. + * + * @param whatsAppInteractiveMediaCarouselMessage (required) + * @return SendWhatsappInteractiveMediaCarouselMessageRequest + * @see Learn more about WhatsApp channel and use cases + */ + public SendWhatsappInteractiveMediaCarouselMessageRequest sendWhatsappInteractiveMediaCarouselMessage( + WhatsAppInteractiveMediaCarouselMessage whatsAppInteractiveMediaCarouselMessage) { + return new SendWhatsappInteractiveMediaCarouselMessageRequest(whatsAppInteractiveMediaCarouselMessage); + } + private RequestDefinition sendWhatsappInteractiveOrderDetailsMessageDefinition( WhatsAppInteractiveOrderDetailsMessage whatsAppInteractiveOrderDetailsMessage) { RequestDefinition.Builder builder = RequestDefinition.builder( @@ -2534,6 +2944,192 @@ public SendWhatsappInteractiveUrlButtonMessageRequest sendWhatsappInteractiveUrl return new SendWhatsappInteractiveUrlButtonMessageRequest(whatsAppInteractiveUrlButtonMessage); } + private RequestDefinition sendWhatsappInteractiveVoiceButtonMessageDefinition( + WhatsAppInteractiveVoiceButtonMessage whatsAppInteractiveVoiceButtonMessage) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/whatsapp/1/message/interactive/voice-button") + .body(whatsAppInteractiveVoiceButtonMessage) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * sendWhatsappInteractiveVoiceButtonMessage request builder class. + */ + public class SendWhatsappInteractiveVoiceButtonMessageRequest { + private final WhatsAppInteractiveVoiceButtonMessage whatsAppInteractiveVoiceButtonMessage; + + private SendWhatsappInteractiveVoiceButtonMessageRequest( + WhatsAppInteractiveVoiceButtonMessage whatsAppInteractiveVoiceButtonMessage) { + this.whatsAppInteractiveVoiceButtonMessage = Objects.requireNonNull( + whatsAppInteractiveVoiceButtonMessage, + "The required parameter 'whatsAppInteractiveVoiceButtonMessage' is missing."); + } + + /** + * Executes the sendWhatsappInteractiveVoiceButtonMessage request. + * + * @return WhatsAppSingleMessageInfo The deserialized response. + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public WhatsAppSingleMessageInfo execute() throws ApiException { + RequestDefinition sendWhatsappInteractiveVoiceButtonMessageDefinition = + sendWhatsappInteractiveVoiceButtonMessageDefinition(whatsAppInteractiveVoiceButtonMessage); + return apiClient.execute( + sendWhatsappInteractiveVoiceButtonMessageDefinition, + new TypeReference() {}.getType()); + } + + /** + * Executes the sendWhatsappInteractiveVoiceButtonMessage request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition sendWhatsappInteractiveVoiceButtonMessageDefinition = + sendWhatsappInteractiveVoiceButtonMessageDefinition(whatsAppInteractiveVoiceButtonMessage); + return apiClient.executeAsync( + sendWhatsappInteractiveVoiceButtonMessageDefinition, + new TypeReference() {}.getType(), + callback); + } + } + + /** + * Send WhatsApp interactive voice button message. + *

+ * Send an interactive voice button message to a single recipient. Interactive voice button messages can only be successfully delivered if the recipient has contacted the business within the last 24 hours, otherwise [template message](#channels/whatsapp/send-whatsapp-template-message) should be used. <br/> The API response will not contain the final delivery status, use [Delivery Reports](#channels/whatsapp/receive-whatsapp-delivery-reports) instead. + * + * @param whatsAppInteractiveVoiceButtonMessage (required) + * @return SendWhatsappInteractiveVoiceButtonMessageRequest + * @see Learn more about WhatsApp channel and use cases + */ + public SendWhatsappInteractiveVoiceButtonMessageRequest sendWhatsappInteractiveVoiceButtonMessage( + WhatsAppInteractiveVoiceButtonMessage whatsAppInteractiveVoiceButtonMessage) { + return new SendWhatsappInteractiveVoiceButtonMessageRequest(whatsAppInteractiveVoiceButtonMessage); + } + + private RequestDefinition shareWabaWhatsappDefinition(WhatsAppShareWabaRequest whatsAppShareWabaRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder( + "POST", "/whatsapp/1/embedded-signup/registrations/share-waba") + .body(whatsAppShareWabaRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * shareWabaWhatsapp request builder class. + */ + public class ShareWabaWhatsappRequest { + private final WhatsAppShareWabaRequest whatsAppShareWabaRequest; + + private ShareWabaWhatsappRequest(WhatsAppShareWabaRequest whatsAppShareWabaRequest) { + this.whatsAppShareWabaRequest = Objects.requireNonNull( + whatsAppShareWabaRequest, "The required parameter 'whatsAppShareWabaRequest' is missing."); + } + + /** + * Executes the shareWabaWhatsapp request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition shareWabaWhatsappDefinition = shareWabaWhatsappDefinition(whatsAppShareWabaRequest); + apiClient.execute(shareWabaWhatsappDefinition); + } + + /** + * Executes the shareWabaWhatsapp request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition shareWabaWhatsappDefinition = shareWabaWhatsappDefinition(whatsAppShareWabaRequest); + return apiClient.executeAsync(shareWabaWhatsappDefinition, callback); + } + } + + /** + * . + *

+ * + * + * @param whatsAppShareWabaRequest (required) + * @return ShareWabaWhatsappRequest + */ + public ShareWabaWhatsappRequest shareWabaWhatsapp(WhatsAppShareWabaRequest whatsAppShareWabaRequest) { + return new ShareWabaWhatsappRequest(whatsAppShareWabaRequest); + } + + private RequestDefinition submitWabaWhatsappConversionsDefinition( + WhatsAppWABAConversionEventRequest whatsAppWABAConversionEventRequest) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/whatsapp/1/conversions/waba") + .body(whatsAppWABAConversionEventRequest) + .requiresAuthentication(true) + .accept("application/json") + .contentType("application/json"); + + return builder.build(); + } + + /** + * submitWabaWhatsappConversions request builder class. + */ + public class SubmitWabaWhatsappConversionsRequest { + private final WhatsAppWABAConversionEventRequest whatsAppWABAConversionEventRequest; + + private SubmitWabaWhatsappConversionsRequest( + WhatsAppWABAConversionEventRequest whatsAppWABAConversionEventRequest) { + this.whatsAppWABAConversionEventRequest = Objects.requireNonNull( + whatsAppWABAConversionEventRequest, + "The required parameter 'whatsAppWABAConversionEventRequest' is missing."); + } + + /** + * Executes the submitWabaWhatsappConversions request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition submitWabaWhatsappConversionsDefinition = + submitWabaWhatsappConversionsDefinition(whatsAppWABAConversionEventRequest); + apiClient.execute(submitWabaWhatsappConversionsDefinition); + } + + /** + * Executes the submitWabaWhatsappConversions request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition submitWabaWhatsappConversionsDefinition = + submitWabaWhatsappConversionsDefinition(whatsAppWABAConversionEventRequest); + return apiClient.executeAsync(submitWabaWhatsappConversionsDefinition, callback); + } + } + + /** + * Submit WABA conversions. + *

+ * Submit WhatsApp conversion events using your WhatsApp Business Account (WABA) phone number as the source. Each conversion event is linked to an ad click via ctwaClickId — a unique identifier contained within the inbound WhatsApp message originating from the ad. You can optionally include conversion details such as value and currency, and a conversion timestamp (up to 7 days in the past). Events are submitted in batches of up to 1,000 and are indivisible — either all are submitted or none. + * + * @param whatsAppWABAConversionEventRequest (required) + * @return SubmitWabaWhatsappConversionsRequest + * @see Learn more about WhatsApp channel and use cases + */ + @Beta + public SubmitWabaWhatsappConversionsRequest submitWabaWhatsappConversions( + WhatsAppWABAConversionEventRequest whatsAppWABAConversionEventRequest) { + return new SubmitWabaWhatsappConversionsRequest(whatsAppWABAConversionEventRequest); + } + private RequestDefinition updateWhatsappSenderBusinessInfoDefinition( String sender, WhatsAppBusinessInfoRequest whatsAppBusinessInfoRequest) { RequestDefinition.Builder builder = RequestDefinition.builder( @@ -2601,6 +3197,70 @@ public UpdateWhatsappSenderBusinessInfoRequest updateWhatsappSenderBusinessInfo( return new UpdateWhatsappSenderBusinessInfoRequest(sender, whatsAppBusinessInfoRequest); } + private RequestDefinition uploadWhatsappSenderPublicKeyDefinition(String sender, File _file) { + RequestDefinition.Builder builder = RequestDefinition.builder("POST", "/whatsapp/1/senders/{sender}/public-key") + .requiresAuthentication(true) + .accept("application/json") + .contentType("multipart/form-data"); + + if (sender != null) { + builder.addPathParameter(new Parameter("sender", sender)); + } + if (_file != null) { + builder.addFormParameter(new Parameter("file", _file)); + } + return builder.build(); + } + + /** + * uploadWhatsappSenderPublicKey request builder class. + */ + public class UploadWhatsappSenderPublicKeyRequest { + private final String sender; + private final File _file; + + private UploadWhatsappSenderPublicKeyRequest(String sender, File _file) { + this.sender = Objects.requireNonNull(sender, "The required parameter 'sender' is missing."); + this._file = Objects.requireNonNull(_file, "The required parameter '_file' is missing."); + } + + /** + * Executes the uploadWhatsappSenderPublicKey request + * @throws ApiException If the API call fails or an error occurs during the request or response processing. + */ + public void execute() throws ApiException { + RequestDefinition uploadWhatsappSenderPublicKeyDefinition = + uploadWhatsappSenderPublicKeyDefinition(sender, _file); + apiClient.execute(uploadWhatsappSenderPublicKeyDefinition); + } + + /** + * Executes the uploadWhatsappSenderPublicKey request asynchronously. + * + * @param callback The {@link ApiCallback} to be invoked. + * @return The {@link okhttp3.Call} associated with the API request. + */ + public okhttp3.Call executeAsync(ApiCallback callback) { + RequestDefinition uploadWhatsappSenderPublicKeyDefinition = + uploadWhatsappSenderPublicKeyDefinition(sender, _file); + return apiClient.executeAsync(uploadWhatsappSenderPublicKeyDefinition, callback); + } + } + + /** + * Upload WhatsApp sender public key. + *

+ * Uploads a public key for WhatsApp encryption. The public key enables end-to-end encrypted data exchange with WhatsApp, such as in WhatsApp Flows. Previous keys are replaced when new ones are uploaded using this endpoint. + * + * @param sender Registered WhatsApp sender number. Must be in international format. (required) + * @param _file Multipart form data containing the public key file. The file must be in PEM format with a 2048-bit RSA key and include the appropriate header and footer lines. Example file content: `----BEGIN PUBLIC KEY-----\\\\n MIIBIjAN... \\\\n ----END PUBLIC (required) + * @return UploadWhatsappSenderPublicKeyRequest + * @see Learn more about WhatsApp channel and use cases + */ + public UploadWhatsappSenderPublicKeyRequest uploadWhatsappSenderPublicKey(String sender, File _file) { + return new UploadWhatsappSenderPublicKeyRequest(sender, _file); + } + private RequestDefinition verifyWhatsappSenderDefinition( String sender, WhatsAppVerifyCodeRequest whatsAppVerifyCodeRequest) { RequestDefinition.Builder builder = RequestDefinition.builder( diff --git a/src/main/java/com/infobip/model/CallRecordingFailedProperties.java b/src/main/java/com/infobip/model/CallRecordingFailedProperties.java index 516594c..a661734 100644 --- a/src/main/java/com/infobip/model/CallRecordingFailedProperties.java +++ b/src/main/java/com/infobip/model/CallRecordingFailedProperties.java @@ -10,6 +10,8 @@ package com.infobip.model; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; /** @@ -19,6 +21,8 @@ public class CallRecordingFailedProperties { private String reason; + private Map recordingCustomData = null; + private String fileId; /** @@ -61,6 +65,64 @@ public void setReason(String reason) { this.reason = reason; } + /** + * Sets recordingCustomData. + *

+ * Field description: + * Recording custom data. + * + * @param recordingCustomData + * @return This {@link CallRecordingFailedProperties instance}. + */ + public CallRecordingFailedProperties recordingCustomData(Map recordingCustomData) { + this.recordingCustomData = recordingCustomData; + return this; + } + + /** + * Puts and entry into recordingCustomData. + *

+ * Field description: + * Recording custom data. + * + * @param key The given key. + * @param recordingCustomDataItem The item to be associated with the given key. + * @return This {@link CallRecordingFailedProperties instance}. + */ + public CallRecordingFailedProperties putRecordingCustomDataItem(String key, String recordingCustomDataItem) { + if (this.recordingCustomData == null) { + this.recordingCustomData = new HashMap<>(); + } + this.recordingCustomData.put(key, recordingCustomDataItem); + return this; + } + + /** + * Returns recordingCustomData. + *

+ * Field description: + * Recording custom data. + * + * @return recordingCustomData + */ + @JsonProperty("recordingCustomData") + public Map getRecordingCustomData() { + return recordingCustomData; + } + + /** + * Sets recordingCustomData. + *

+ * Field description: + * Recording custom data. + * + * @param recordingCustomData + */ + @JsonProperty("recordingCustomData") + public void setRecordingCustomData(Map recordingCustomData) { + this.recordingCustomData = recordingCustomData; + } + /** * Sets fileId. *

@@ -111,12 +173,13 @@ public boolean equals(Object o) { } CallRecordingFailedProperties callRecordingFailedProperties = (CallRecordingFailedProperties) o; return Objects.equals(this.reason, callRecordingFailedProperties.reason) + && Objects.equals(this.recordingCustomData, callRecordingFailedProperties.recordingCustomData) && Objects.equals(this.fileId, callRecordingFailedProperties.fileId); } @Override public int hashCode() { - return Objects.hash(reason, fileId); + return Objects.hash(reason, recordingCustomData, fileId); } @Override @@ -128,6 +191,9 @@ public String toString() { .append(" reason: ") .append(toIndentedString(reason)) .append(newLine) + .append(" recordingCustomData: ") + .append(toIndentedString(recordingCustomData)) + .append(newLine) .append(" fileId: ") .append(toIndentedString(fileId)) .append(newLine) diff --git a/src/main/java/com/infobip/model/CallRoutingEndpointType.java b/src/main/java/com/infobip/model/CallRoutingEndpointType.java index 2d3cb47..269d3dd 100644 --- a/src/main/java/com/infobip/model/CallRoutingEndpointType.java +++ b/src/main/java/com/infobip/model/CallRoutingEndpointType.java @@ -20,8 +20,8 @@ public enum CallRoutingEndpointType { SIP("SIP"), WEBRTC("WEBRTC"), VIBER("VIBER"), - WHATSAPP("WHATSAPP"), - WEBSOCKET("WEBSOCKET"); + WEBSOCKET("WEBSOCKET"), + WHATSAPP("WHATSAPP"); private final String value; diff --git a/src/main/java/com/infobip/model/CallRoutingSipEndpoint.java b/src/main/java/com/infobip/model/CallRoutingSipEndpoint.java index e10d647..50a7e48 100644 --- a/src/main/java/com/infobip/model/CallRoutingSipEndpoint.java +++ b/src/main/java/com/infobip/model/CallRoutingSipEndpoint.java @@ -27,6 +27,8 @@ public class CallRoutingSipEndpoint extends CallRoutingEndpoint { private Map customHeaders = null; + private CallRoutingRingbackGeneration ringbackGeneration; + /** * Constructs a new {@link CallRoutingSipEndpoint} instance. */ @@ -218,6 +220,37 @@ public void setCustomHeaders(Map customHeaders) { this.customHeaders = customHeaders; } + /** + * Sets ringbackGeneration. + * + * @param ringbackGeneration + * @return This {@link CallRoutingSipEndpoint instance}. + */ + public CallRoutingSipEndpoint ringbackGeneration(CallRoutingRingbackGeneration ringbackGeneration) { + this.ringbackGeneration = ringbackGeneration; + return this; + } + + /** + * Returns ringbackGeneration. + * + * @return ringbackGeneration + */ + @JsonProperty("ringbackGeneration") + public CallRoutingRingbackGeneration getRingbackGeneration() { + return ringbackGeneration; + } + + /** + * Sets ringbackGeneration. + * + * @param ringbackGeneration + */ + @JsonProperty("ringbackGeneration") + public void setRingbackGeneration(CallRoutingRingbackGeneration ringbackGeneration) { + this.ringbackGeneration = ringbackGeneration; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -231,12 +264,13 @@ public boolean equals(Object o) { && Objects.equals(this.username, callRoutingSipEndpoint.username) && Objects.equals(this.sipTrunkId, callRoutingSipEndpoint.sipTrunkId) && Objects.equals(this.customHeaders, callRoutingSipEndpoint.customHeaders) + && Objects.equals(this.ringbackGeneration, callRoutingSipEndpoint.ringbackGeneration) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(from, username, sipTrunkId, customHeaders, super.hashCode()); + return Objects.hash(from, username, sipTrunkId, customHeaders, ringbackGeneration, super.hashCode()); } @Override @@ -260,6 +294,9 @@ public String toString() { .append(" customHeaders: ") .append(toIndentedString(customHeaders)) .append(newLine) + .append(" ringbackGeneration: ") + .append(toIndentedString(ringbackGeneration)) + .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/CallVoice.java b/src/main/java/com/infobip/model/CallVoice.java index 6c9f571..094d21b 100644 --- a/src/main/java/com/infobip/model/CallVoice.java +++ b/src/main/java/com/infobip/model/CallVoice.java @@ -16,437 +16,437 @@ * Voice name in which text would be synthesized. More info about available languages and voices can be found [here](https://www.infobip.com/docs/voice-and-video/getting-started#text-to-speech). */ public enum CallVoice { - ZEINA("Zeina"), - AISHA_BETA_("Aisha (beta)"), - FAROOQ_BETA_("Farooq (beta)"), - HUSSEIN_BETA_("Hussein (beta)"), - AMAL_BETA_("Amal (beta)"), - SAYAN_BETA_("Sayan (beta)"), - SUSHMITA_BETA_("Sushmita (beta)"), - DARINA("Darina"), - CONCHITA("Conchita"), - ZHIYU("Zhiyu"), - LIU_BETA_("Liu (beta)"), - WANG_BETA_("Wang (beta)"), - ZHANG_BETA_("Zhang (beta)"), - LIN_BETA_("Lin (beta)"), - AKEMI_BETA_("Akemi (beta)"), - CHEN_BETA_("Chen (beta)"), - HUANG_BETA_("Huang (beta)"), - FANG("Fang"), - CHAO("Chao"), - MING("Ming"), - ANETA("Aneta"), - NAJA("Naja"), - MADS("Mads"), - RUBEN("Ruben"), - LOTTE("Lotte"), - JOANNA("Joanna"), - IVY("Ivy"), - KENDRA("Kendra"), - KIMBERLY("Kimberly"), - SALLI("Salli"), - JOEY("Joey"), - JUSTIN("Justin"), - MATTHEW("Matthew"), - JENNIFER("Jennifer"), - DAVID("David"), - RUSSELL("Russell"), - NICOLE("Nicole"), - BRIAN("Brian"), - AMY("Amy"), - EMMA("Emma"), - ADITI("Aditi"), - RAVEENA("Raveena"), - GERAINT("Geraint"), - EVELIN_BETA_("Evelin (beta)"), - CELINE("Celine"), - LEA("Lea"), - MATHIEU("Mathieu"), - CHANTAL("Chantal"), - VICKI("Vicki"), - HANS("Hans"), - MARLENE("Marlene"), - SOPHIA_BETA_("Sophia (beta)"), - DINESH_BETA_("Dinesh (beta)"), - LEELA_BETA_("Leela (beta)"), - ABIGAIL("Abigail"), - MEIRA("Meira"), - IDAN("Idan"), - YOSEF("Yosef"), AADITA("Aadita"), + AAROHI_NEURAL_("Aarohi (neural)"), AARUSHI_BETA_("Aarushi (beta)"), - AKASH_BETA_("Akash (beta)"), - DAMAN_BETA_("Daman (beta)"), - DIVYA_BETA_("Divya (beta)"), + AARYA("Aarya"), + ABBI_NEURAL_("Abbi (neural)"), + ABIGAIL("Abigail"), + ABRIELLE_BETA_("Abrielle (beta)"), + ABRIL_NEURAL_("Abril (neural)"), + ACHARA_NEURAL_("Achara (neural)"), + ADITI("Aditi"), + AGNIESZKA_NEURAL_("Agnieszka (neural)"), AGOTA("Agota"), - DORA("Dora"), - KARL("Karl"), - INDAH_BETA_("Indah (beta)"), - ARIF_BETA_("Arif (beta)"), - REZA_BETA_("Reza (beta)"), - NURUL_BETA_("Nurul (beta)"), - GIANNA_BETA_("Gianna (beta)"), - CARLA("Carla"), - BIANCA("Bianca"), - GIORGIO("Giorgio"), - TAKUMI("Takumi"), - MIZUKI("Mizuki"), - SHASHANK_BETA_("Shashank (beta)"), - NAMRATHA_BETA_("Namratha (beta)"), + AHMET_NEURAL_("Ahmet (neural)"), AIGUL_NEURAL_("Aigul (neural)"), - DAULET_NEURAL_("Daulet (neural)"), - SEOYEON("Seoyeon"), - SUMI_BETA_("Sumi (beta)"), - JINA_BETA_("Jina (beta)"), - HIMCHAN_BETA_("Himchan (beta)"), - MINHO_BETA_("Minho (beta)"), - AMEERA("Ameera"), - NURIN("Nurin"), - NIJAT("Nijat"), - FUAAD("Fuaad"), - VISHNU_BETA_("Vishnu (beta)"), - KIRTI_BETA_("Kirti (beta)"), - LIV("Liv"), - EWA("Ewa"), - MAJA("Maja"), - JACEK("Jacek"), - JAN("Jan"), - CRISTIANO("Cristiano"), - INES("Ines"), - ABRIELLE_BETA_("Abrielle (beta)"), - HENRIQUES_BETA_("Henriques (beta)"), - JERALDO_BETA_("Jeraldo (beta)"), - JACINDA_BETA_("Jacinda (beta)"), - CAMILA("Camila"), - RICARDO("Ricardo"), - VITORIA("Vitoria"), - CARMEN("Carmen"), - MAXIM("Maxim"), - TATYANA("Tatyana"), - NATALIA("Natalia"), - MIGUEL("Miguel"), - LINDA("Linda"), - ENRIQUE("Enrique"), - GABRIELA_BETA_("Gabriela (beta)"), - LUPE("Lupe"), - PENELOPE("Penelope"), - MIA("Mia"), - ASTRID("Astrid"), - GANESH_BETA_("Ganesh (beta)"), - SHRUTI_BETA_("Shruti (beta)"), - VIJAY_BETA_("Vijay (beta)"), - SAMANTHA_BETA_("Samantha (beta)"), - NATCHAYA_BETA_("Natchaya (beta)"), - FILIZ("Filiz"), - ULYANA("Ulyana"), - MADINA_NEURAL_("Madina (neural)"), - SARDOR_NEURAL_("Sardor (neural)"), - LIEN_BETA_("Lien (beta)"), - QUAN_BETA_("Quan (beta)"), - MAI_BETA_("Mai (beta)"), - TUAN_BETA_("Tuan (beta)"), - GWYNETH("Gwyneth"), - AARYA("Aarya"), - ARJUN("Arjun"), - REVATI("Revati"), - HAMED_NEURAL_("Hamed (neural)"), - SALMA_NEURAL_("Salma (neural)"), - SHAKIR_NEURAL_("Shakir (neural)"), - ZARIYAH_NEURAL_("Zariyah (neural)"), - BASHKAR_NEURAL_("Bashkar (neural)"), - TANISHAA_NEURAL_("Tanishaa (neural)"), - BORISLAV_NEURAL_("Borislav (neural)"), - KALINA_NEURAL_("Kalina (neural)"), + AISHA_BETA_("Aisha (beta)"), + AKASH_BETA_("Akash (beta)"), + AKEMI_BETA_("Akemi (beta)"), + ALAIN_NEURAL_("Alain (neural)"), ALBA_NEURAL_("Alba (neural)"), - ENRIC_NEURAL_("Enric (neural)"), - JOANA_NEURAL_("Joana (neural)"), - XIAOCHEN_NEURAL_("Xiaochen (neural)"), - XIAOHAN_NEURAL_("Xiaohan (neural)"), - XIAOMENG_NEURAL_("Xiaomeng (neural)"), - XIAOMO_NEURAL_("Xiaomo (neural)"), - XIAOQIU_NEURAL_("Xiaoqiu (neural)"), - XIAOROU_NEURAL_("Xiaorou (neural)"), - XIAORUI_NEURAL_("Xiaorui (neural)"), - XIAOXIAO_NEURAL_("Xiaoxiao (neural)"), - XIAOYAN_NEURAL_("Xiaoyan (neural)"), - XIAOYI_NEURAL_("Xiaoyi (neural)"), - XIAOZHEN_NEURAL_("Xiaozhen (neural)"), - YUNFENG_NEURAL_("Yunfeng (neural)"), - YUNHAO_NEURAL_("Yunhao (neural)"), - YUNJIAN_NEURAL_("Yunjian (neural)"), - YUNJIE_NEURAL_("Yunjie (neural)"), - YUNXI_NEURAL_("Yunxi (neural)"), - YUNXIA_NEURAL_("Yunxia (neural)"), - YUNYANG_NEURAL_("Yunyang (neural)"), - YUNYE_NEURAL_("Yunye (neural)"), - YUNZE_NEURAL_("Yunze (neural)"), - HIUGAAI_NEURAL_("HiuGaai (neural)"), - HIUMAAN_NEURAL_("HiuMaan (neural)"), - HSIAOCHEN_NEURAL_("HsiaoChen (neural)"), - HSIAOYU_NEURAL_("HsiaoYu (neural)"), - WANLUNG_NEURAL_("WanLung (neural)"), - YUNJHE_NEURAL_("YunJhe (neural)"), - GABRIJELA_NEURAL_("Gabrijela (neural)"), - SRECKO_NEURAL_("Srecko (neural)"), - ANTONIN_NEURAL_("Antonin (neural)"), - VLASTA_NEURAL_("Vlasta (neural)"), - CHRISTEL_NEURAL_("Christel (neural)"), - JEPPE_NEURAL_("Jeppe (neural)"), - COLETTE_NEURAL_("Colette (neural)"), - FENNA_NEURAL_("Fenna (neural)"), - MAARTEN_NEURAL_("Maarten (neural)"), + ALED_NEURAL_("Aled (neural)"), + ALFIE_NEURAL_("Alfie (neural)"), + ALINA_NEURAL_("Alina (neural)"), + ALONSO_NEURAL_("Alonso (neural)"), + ALVARO_NEURAL_("Alvaro (neural)"), + AMAL_BETA_("Amal (beta)"), + AMALA_NEURAL_("Amala (neural)"), AMBER_NEURAL_("Amber (neural)"), + AMEERA("Ameera"), + AMY("Amy"), ANDREW_NEURAL_("Andrew (neural)"), + ANETA("Aneta"), + ANGELO_NEURAL_("Angelo (neural)"), + ANNETTE_NEURAL_("Annette (neural)"), + ANTOINE_NEURAL_("Antoine (neural)"), + ANTONIN_NEURAL_("Antonin (neural)"), + ANTONIO_NEURAL_("Antonio (neural)"), + AOI_NEURAL_("Aoi (neural)"), + ARDI_NEURAL_("Ardi (neural)"), ARIA_NEURAL_("Aria (neural)"), + ARIANE_NEURAL_("Ariane (neural)"), + ARIF_BETA_("Arif (beta)"), + ARJUN("Arjun"), + ARNAU_NEURAL_("Arnau (neural)"), + ASAD_NEURAL_("Asad (neural)"), ASHLEY_NEURAL_("Ashley (neural)"), + ASTRID("Astrid"), + ATHINA_NEURAL_("Athina (neural)"), AVA_NEURAL_("Ava (neural)"), + AVRI_NEURAL_("Avri (neural)"), + BASHKAR_NEURAL_("Bashkar (neural)"), + BEATRIZ_NEURAL_("Beatriz (neural)"), + BELLA_NEURAL_("Bella (neural)"), + BENIGNO_NEURAL_("Benigno (neural)"), + BERND_NEURAL_("Bernd (neural)"), + BIANCA("Bianca"), + BLESSICA_NEURAL_("Blessica (neural)"), + BONGJIN_NEURAL_("BongJin (neural)"), + BORISLAV_NEURAL_("Borislav (neural)"), BRANDON_NEURAL_("Brandon (neural)"), + BRENDA_NEURAL_("Brenda (neural)"), + BRIAN("Brian"), BRIAN_NEURAL_("Brian (neural)"), + BRIGITTE_NEURAL_("Brigitte (neural)"), + CALIMERO_NEURAL_("Calimero (neural)"), + CAMILA("Camila"), + CANDELA_NEURAL_("Candela (neural)"), + CARLA("Carla"), + CARLOTA_NEURAL_("Carlota (neural)"), + CARLY_NEURAL_("Carly (neural)"), + CARMEN("Carmen"), + CATALDO_NEURAL_("Cataldo (neural)"), + CECILIO_NEURAL_("Cecilio (neural)"), + CELESTE_NEURAL_("Celeste (neural)"), + CELINE("Celine"), + CHANTAL("Chantal"), + CHAO("Chao"), + CHEN_BETA_("Chen (beta)"), + CHRISTEL_NEURAL_("Christel (neural)"), + CHRISTOPH_NEURAL_("Christoph (neural)"), CHRISTOPHER_NEURAL_("Christopher (neural)"), + CLARA_NEURAL_("Clara (neural)"), + CLAUDE_NEURAL_("Claude (neural)"), + COLETTE_NEURAL_("Colette (neural)"), + CONCHITA("Conchita"), + CONNOR_NEURAL_("Connor (neural)"), + CONRAD_NEURAL_("Conrad (neural)"), CORA_NEURAL_("Cora (neural)"), + CORALIE_NEURAL_("Coralie (neural)"), + CRISTIANO("Cristiano"), + DAICHI_NEURAL_("Daichi (neural)"), + DALIA_NEURAL_("Dalia (neural)"), + DAMAN_BETA_("Daman (beta)"), + DARINA("Darina"), + DARIO_NEURAL_("Dario (neural)"), + DARIYA_NEURAL_("Dariya (neural)"), + DARREN_NEURAL_("Darren (neural)"), + DAUDI_NEURAL_("Daudi (neural)"), + DAULET_NEURAL_("Daulet (neural)"), + DAVID("David"), DAVIS_NEURAL_("Davis (neural)"), + DENISE_NEURAL_("Denise (neural)"), + DHWANI_NEURAL_("Dhwani (neural)"), + DIEGO_NEURAL_("Diego (neural)"), + DINESH_BETA_("Dinesh (beta)"), + DIVYA_BETA_("Divya (beta)"), + DMITRY_NEURAL_("Dmitry (neural)"), + DONATO_NEURAL_("Donato (neural)"), + DORA("Dora"), + DUARTE_NEURAL_("Duarte (neural)"), + DUNCAN_NEURAL_("Duncan (neural)"), + ELENA_NEURAL_("Elena (neural)"), + ELIAS_NEURAL_("Elias (neural)"), ELIZABETH_NEURAL_("Elizabeth (neural)"), + ELKE_NEURAL_("Elke (neural)"), + ELLIOT_NEURAL_("Elliot (neural)"), + ELSA_NEURAL_("Elsa (neural)"), + ELSIE_NEURAL_("Elsie (neural)"), + ELVIRA_NEURAL_("Elvira (neural)"), + ELZA_NEURAL_("Elza (neural)"), + EMEL_NEURAL_("Emel (neural)"), + EMIL_NEURAL_("Emil (neural)"), + EMILY_NEURAL_("Emily (neural)"), + EMMA("Emma"), EMMA_NEURAL_("Emma (neural)"), + ENRIC_NEURAL_("Enric (neural)"), + ENRIQUE("Enrique"), ERIC_NEURAL_("Eric (neural)"), + ESTRELLA_NEURAL_("Estrella (neural)"), + ETHAN_NEURAL_("Ethan (neural)"), + EVELIN_BETA_("Evelin (beta)"), + EWA("Ewa"), + FABIO_NEURAL_("Fabio (neural)"), + FABIOLA_NEURAL_("Fabiola (neural)"), + FABRICE_NEURAL_("Fabrice (neural)"), + FANG("Fang"), + FAROOQ_BETA_("Farooq (beta)"), + FENNA_NEURAL_("Fenna (neural)"), + FERNANDA_NEURAL_("Fernanda (neural)"), + FIAMMA_NEURAL_("Fiamma (neural)"), + FILIZ("Filiz"), + FINN_NEURAL_("Finn (neural)"), + FRANCISCA_NEURAL_("Francisca (neural)"), + FREYA_NEURAL_("Freya (neural)"), + FUAAD("Fuaad"), + GABRIELA_BETA_("Gabriela (beta)"), + GABRIJELA_NEURAL_("Gabrijela (neural)"), + GADIS_NEURAL_("Gadis (neural)"), + GAGAN_NEURAL_("Gagan (neural)"), + GANESH_BETA_("Ganesh (beta)"), + GERAINT("Geraint"), + GERARDO_NEURAL_("Gerardo (neural)"), + GIANNA_BETA_("Gianna (beta)"), + GIANNI_NEURAL_("Gianni (neural)"), + GIORGIO("Giorgio"), + GIOVANNA_NEURAL_("Giovanna (neural)"), + GIUSEPPE_NEURAL_("Giuseppe (neural)"), + GOOKMIN_NEURAL_("GookMin (neural)"), + GUDRUN_NEURAL_("Gudrun (neural)"), + GUNNAR_NEURAL_("Gunnar (neural)"), GUY_NEURAL_("Guy (neural)"), + GWYNETH("Gwyneth"), + HAMED_NEURAL_("Hamed (neural)"), + HANS("Hans"), + HARRI_NEURAL_("Harri (neural)"), + HENRI_NEURAL_("Henri (neural)"), + HENRIQUES_BETA_("Henriques (beta)"), + HILA_NEURAL_("Hila (neural)"), + HILLEVI_NEURAL_("Hillevi (neural)"), + HIMCHAN_BETA_("Himchan (beta)"), + HIUGAAI_NEURAL_("HiuGaai (neural)"), + HIUMAAN_NEURAL_("HiuMaan (neural)"), + HOAIMY_NEURAL_("HoaiMy (neural)"), + HOLLIE_NEURAL_("Hollie (neural)"), + HSIAOCHEN_NEURAL_("HsiaoChen (neural)"), + HSIAOYU_NEURAL_("HsiaoYu (neural)"), + HUANG_BETA_("Huang (beta)"), + HUMBERTO_NEURAL_("Humberto (neural)"), + HUSSEIN_BETA_("Hussein (beta)"), + HYUNSU_NEURAL_("Hyunsu (neural)"), + IDAN("Idan"), + IMELDA_NEURAL_("Imelda (neural)"), + INJOON_NEURAL_("InJoon (neural)"), + INDAH_BETA_("Indah (beta)"), + INES("Ines"), + INGRID_NEURAL_("Ingrid (neural)"), + IRENE_NEURAL_("Irene (neural)"), + IRMA_NEURAL_("Irma (neural)"), + ISABELLA_NEURAL_("Isabella (neural)"), + ISELIN_NEURAL_("Iselin (neural)"), + IVY("Ivy"), + JACEK("Jacek"), + JACINDA_BETA_("Jacinda (beta)"), JACOB_NEURAL_("Jacob (neural)"), + JACQUELINE_NEURAL_("Jacqueline (neural)"), + JAMAL_NEURAL_("Jamal (neural)"), + JAN("Jan"), + JAN_NEURAL_("Jan (neural)"), JANE_NEURAL_("Jane (neural)"), JASON_NEURAL_("Jason (neural)"), + JEAN_NEURAL_("Jean (neural)"), + JENNIFER("Jennifer"), JENNY_NEURAL_("Jenny (neural)"), - MICHELLE_NEURAL_("Michelle (neural)"), - MONICA_NEURAL_("Monica (neural)"), - NANCY_NEURAL_("Nancy (neural)"), - ROGER_NEURAL_("Roger (neural)"), - SARA_NEURAL_("Sara (neural)"), - STEFFAN_NEURAL_("Steffan (neural)"), - TONY_NEURAL_("Tony (neural)"), - ANNETTE_NEURAL_("Annette (neural)"), - CARLY_NEURAL_("Carly (neural)"), - DARREN_NEURAL_("Darren (neural)"), - DUNCAN_NEURAL_("Duncan (neural)"), - ELSIE_NEURAL_("Elsie (neural)"), - FREYA_NEURAL_("Freya (neural)"), - JOANNE_NEURAL_("Joanne (neural)"), - KEN_NEURAL_("Ken (neural)"), - KIM_NEURAL_("Kim (neural)"), - NATASHA_NEURAL_("Natasha (neural)"), - NEIL_NEURAL_("Neil (neural)"), - TIM_NEURAL_("Tim (neural)"), - TINA_NEURAL_("Tina (neural)"), - WILLIAM_NEURAL_("William (neural)"), - ABBI_NEURAL_("Abbi (neural)"), - ALFIE_NEURAL_("Alfie (neural)"), - BELLA_NEURAL_("Bella (neural)"), - ELLIOT_NEURAL_("Elliot (neural)"), - ETHAN_NEURAL_("Ethan (neural)"), - HOLLIE_NEURAL_("Hollie (neural)"), - LIBBY_NEURAL_("Libby (neural)"), - NOAH_NEURAL_("Noah (neural)"), - OLIVER_NEURAL_("Oliver (neural)"), - OLIVIA_NEURAL_("Olivia (neural)"), - RYAN_NEURAL_("Ryan (neural)"), - SONIA_NEURAL_("Sonia (neural)"), - THOMAS_NEURAL_("Thomas (neural)"), - CLARA_NEURAL_("Clara (neural)"), - LIAM_NEURAL_("Liam (neural)"), - NEERJA_NEURAL_("Neerja (neural)"), - PRABHAT_NEURAL_("Prabhat (neural)"), - CONNOR_NEURAL_("Connor (neural)"), - EMILY_NEURAL_("Emily (neural)"), - ANGELO_NEURAL_("Angelo (neural)"), - BLESSICA_NEURAL_("Blessica (neural)"), - HARRI_NEURAL_("Harri (neural)"), - NOORA_NEURAL_("Noora (neural)"), - SELMA_NEURAL_("Selma (neural)"), - ALAIN_NEURAL_("Alain (neural)"), - BRIGITTE_NEURAL_("Brigitte (neural)"), - CELESTE_NEURAL_("Celeste (neural)"), - CLAUDE_NEURAL_("Claude (neural)"), - CORALIE_NEURAL_("Coralie (neural)"), - DENISE_NEURAL_("Denise (neural)"), - HENRI_NEURAL_("Henri (neural)"), - JACQUELINE_NEURAL_("Jacqueline (neural)"), + JEPPE_NEURAL_("Jeppe (neural)"), + JERALDO_BETA_("Jeraldo (beta)"), JEROME_NEURAL_("Jerome (neural)"), + JIMIN_NEURAL_("JiMin (neural)"), + JINA_BETA_("Jina (beta)"), + JOANA_NEURAL_("Joana (neural)"), + JOANNA("Joanna"), + JOANNE_NEURAL_("Joanne (neural)"), + JOEY("Joey"), + JONAS_NEURAL_("Jonas (neural)"), + JORGE_NEURAL_("Jorge (neural)"), JOSEPHINE_NEURAL_("Josephine (neural)"), - MAURICE_NEURAL_("Maurice (neural)"), - VIVIENNE_NEURAL_("Vivienne (neural)"), - YVES_NEURAL_("Yves (neural)"), - YVETTE_NEURAL_("Yvette (neural)"), - ANTOINE_NEURAL_("Antoine (neural)"), - JEAN_NEURAL_("Jean (neural)"), - SYLVIE_NEURAL_("Sylvie (neural)"), - THIERRY_NEURAL_("Thierry (neural)"), - ARIANE_NEURAL_("Ariane (neural)"), - FABRICE_NEURAL_("Fabrice (neural)"), - AMALA_NEURAL_("Amala (neural)"), - BERND_NEURAL_("Bernd (neural)"), - CHRISTOPH_NEURAL_("Christoph (neural)"), - CONRAD_NEURAL_("Conrad (neural)"), - ELKE_NEURAL_("Elke (neural)"), + JULIO_NEURAL_("Julio (neural)"), + JUSTIN("Justin"), + KALINA_NEURAL_("Kalina (neural)"), + KARL("Karl"), KASPER_NEURAL_("Kasper (neural)"), KATJA_NEURAL_("Katja (neural)"), + KEITA_NEURAL_("Keita (neural)"), + KEN_NEURAL_("Ken (neural)"), + KENDRA("Kendra"), KILLIAN_NEURAL_("Killian (neural)"), + KIM_NEURAL_("Kim (neural)"), + KIMBERLY("Kimberly"), + KIRTI_BETA_("Kirti (beta)"), KLARISSA_NEURAL_("Klarissa (neural)"), KLAUS_NEURAL_("Klaus (neural)"), + LAIA_NEURAL_("Laia (neural)"), + LARISSA_NEURAL_("Larissa (neural)"), + LEA("Lea"), + LEELA_BETA_("Leela (beta)"), + LEILA_NEURAL_("Leila (neural)"), + LENI_NEURAL_("Leni (neural)"), + LETICIA_NEURAL_("Leticia (neural)"), + LIA_NEURAL_("Lia (neural)"), + LIAM_NEURAL_("Liam (neural)"), + LIBBY_NEURAL_("Libby (neural)"), + LIBERTO_NEURAL_("Liberto (neural)"), + LIEN_BETA_("Lien (beta)"), + LIN_BETA_("Lin (beta)"), + LINDA("Linda"), + LISANDRO_NEURAL_("Lisandro (neural)"), + LIU_BETA_("Liu (beta)"), + LIV("Liv"), + LOTTE("Lotte"), LOUISA_NEURAL_("Louisa (neural)"), + LUCIANO_NEURAL_("Luciano (neural)"), + LUKAS_NEURAL_("Lukas (neural)"), + LUPE("Lupe"), + MAARTEN_NEURAL_("Maarten (neural)"), + MADHUR_NEURAL_("Madhur (neural)"), + MADINA_NEURAL_("Madina (neural)"), + MADS("Mads"), + MAI_BETA_("Mai (beta)"), + MAJA("Maja"), MAJA_NEURAL_("Maja (neural)"), - RALF_NEURAL_("Ralf (neural)"), - SERAPHINA_NEURAL_("Seraphina (neural)"), - TANJA_NEURAL_("Tanja (neural)"), - INGRID_NEURAL_("Ingrid (neural)"), - JONAS_NEURAL_("Jonas (neural)"), - JAN_NEURAL_("Jan (neural)"), - LENI_NEURAL_("Leni (neural)"), - ATHINA_NEURAL_("Athina (neural)"), + MANOHAR_NEURAL_("Manohar (neural)"), + MANUELA_NEURAL_("Manuela (neural)"), + MAREK_NEURAL_("Marek (neural)"), + MARINA_NEURAL_("Marina (neural)"), + MARLENE("Marlene"), + MATHIEU("Mathieu"), + MATTHEW("Matthew"), + MATTIAS_NEURAL_("Mattias (neural)"), + MAURICE_NEURAL_("Maurice (neural)"), + MAXIM("Maxim"), + MAYU_NEURAL_("Mayu (neural)"), + MEIRA("Meira"), + MIA("Mia"), + MICHELLE_NEURAL_("Michelle (neural)"), + MIDHUN_NEURAL_("Midhun (neural)"), + MIGUEL("Miguel"), + MING("Ming"), + MINHO_BETA_("Minho (beta)"), + MIZUKI("Mizuki"), + MOHAN_NEURAL_("Mohan (neural)"), + MONICA_NEURAL_("Monica (neural)"), + MOUNA_NEURAL_("Mouna (neural)"), + NAJA("Naja"), + NAMMINH_NEURAL_("NamMinh (neural)"), + NAMRATHA_BETA_("Namratha (beta)"), + NANAMI_NEURAL_("Nanami (neural)"), + NANCY_NEURAL_("Nancy (neural)"), + NAOKI_NEURAL_("Naoki (neural)"), + NATALIA("Natalia"), + NATASHA_NEURAL_("Natasha (neural)"), + NATCHAYA_BETA_("Natchaya (beta)"), + NEERJA_NEURAL_("Neerja (neural)"), + NEIL_NEURAL_("Neil (neural)"), NESTORAS_NEURAL_("Nestoras (neural)"), - DHWANI_NEURAL_("Dhwani (neural)"), + NIA_NEURAL_("Nia (neural)"), + NICOLAU_NEURAL_("Nicolau (neural)"), + NICOLE("Nicole"), + NIJAT("Nijat"), + NIL_NEURAL_("Nil (neural)"), NIRANJAN_NEURAL_("Niranjan (neural)"), - AVRI_NEURAL_("Avri (neural)"), - HILA_NEURAL_("Hila (neural)"), - MADHUR_NEURAL_("Madhur (neural)"), - SWARA_NEURAL_("Swara (neural)"), + NIWAT_NEURAL_("Niwat (neural)"), + NOAH_NEURAL_("Noah (neural)"), NOEMI_NEURAL_("Noemi (neural)"), - TAMAS_NEURAL_("Tamas (neural)"), - GUDRUN_NEURAL_("Gudrun (neural)"), - GUNNAR_NEURAL_("Gunnar (neural)"), - ARDI_NEURAL_("Ardi (neural)"), - GADIS_NEURAL_("Gadis (neural)"), - BENIGNO_NEURAL_("Benigno (neural)"), - CALIMERO_NEURAL_("Calimero (neural)"), - CATALDO_NEURAL_("Cataldo (neural)"), - DIEGO_NEURAL_("Diego (neural)"), - ELSA_NEURAL_("Elsa (neural)"), - FABIOLA_NEURAL_("Fabiola (neural)"), - FIAMMA_NEURAL_("Fiamma (neural)"), - GIANNI_NEURAL_("Gianni (neural)"), - GIUSEPPE_NEURAL_("Giuseppe (neural)"), - IMELDA_NEURAL_("Imelda (neural)"), - IRMA_NEURAL_("Irma (neural)"), - ISABELLA_NEURAL_("Isabella (neural)"), - LISANDRO_NEURAL_("Lisandro (neural)"), + NOORA_NEURAL_("Noora (neural)"), + NURIA_NEURAL_("Nuria (neural)"), + NURIN("Nurin"), + NURUL_BETA_("Nurul (beta)"), + OLIVER_NEURAL_("Oliver (neural)"), + OLIVIA_NEURAL_("Olivia (neural)"), + OSMAN_NEURAL_("Osman (neural)"), + OSTAP_NEURAL_("Ostap (neural)"), + PALLAVI_NEURAL_("Pallavi (neural)"), PALMIRA_NEURAL_("Palmira (neural)"), + PALOMA_NEURAL_("Paloma (neural)"), + PELAYO_NEURAL_("Pelayo (neural)"), + PENELOPE("Penelope"), + PERNILLE_NEURAL_("Pernille (neural)"), + PETRA_NEURAL_("Petra (neural)"), PIERINA_NEURAL_("Pierina (neural)"), + POLINA_NEURAL_("Polina (neural)"), + PRABHAT_NEURAL_("Prabhat (neural)"), + PREMWADEE_NEURAL_("Premwadee (neural)"), + QUAN_BETA_("Quan (beta)"), + RAFIKI_NEURAL_("Rafiki (neural)"), + RALF_NEURAL_("Ralf (neural)"), + RAQUEL_NEURAL_("Raquel (neural)"), + RAVEENA("Raveena"), + REHEMA_NEURAL_("Rehema (neural)"), + RENATA_NEURAL_("Renata (neural)"), + REVATI("Revati"), + REZA_BETA_("Reza (beta)"), + RICARDO("Ricardo"), RINALDO_NEURAL_("Rinaldo (neural)"), - AOI_NEURAL_("Aoi (neural)"), - DAICHI_NEURAL_("Daichi (neural)"), - KEITA_NEURAL_("Keita (neural)"), - MAYU_NEURAL_("Mayu (neural)"), - NANAMI_NEURAL_("Nanami (neural)"), - NAOKI_NEURAL_("Naoki (neural)"), - SHIORI_NEURAL_("Shiori (neural)"), - GAGAN_NEURAL_("Gagan (neural)"), + ROGER_NEURAL_("Roger (neural)"), + ROK_NEURAL_("Rok (neural)"), + RUBEN("Ruben"), + RUSSELL("Russell"), + RYAN_NEURAL_("Ryan (neural)"), + SALLI("Salli"), + SALMA_NEURAL_("Salma (neural)"), + SAMANTHA_BETA_("Samantha (beta)"), SAPNA_NEURAL_("Sapna (neural)"), - BONGJIN_NEURAL_("BongJin (neural)"), - GOOKMIN_NEURAL_("GookMin (neural)"), - HYUNSU_NEURAL_("Hyunsu (neural)"), - INJOON_NEURAL_("InJoon (neural)"), - JIMIN_NEURAL_("JiMin (neural)"), + SARA_NEURAL_("Sara (neural)"), + SARDOR_NEURAL_("Sardor (neural)"), + SAUL_NEURAL_("Saul (neural)"), + SAYAN_BETA_("Sayan (beta)"), + SELMA_NEURAL_("Selma (neural)"), SEOHYEON_NEURAL_("SeoHyeon (neural)"), + SEOYEON("Seoyeon"), + SERAPHINA_NEURAL_("Seraphina (neural)"), + SHAKIR_NEURAL_("Shakir (neural)"), + SHASHANK_BETA_("Shashank (beta)"), + SHIORI_NEURAL_("Shiori (neural)"), + SHRUTI_BETA_("Shruti (beta)"), + SHRUTI_NEURAL_("Shruti (neural)"), + SOBHANA_NEURAL_("Sobhana (neural)"), + SOFIE_NEURAL_("Sofie (neural)"), + SONIA_NEURAL_("Sonia (neural)"), SOONBOK_NEURAL_("SoonBok (neural)"), + SOPHIA_BETA_("Sophia (beta)"), + SRECKO_NEURAL_("Srecko (neural)"), + STEFFAN_NEURAL_("Steffan (neural)"), + SUMI_BETA_("Sumi (beta)"), SUNHI_NEURAL_("SunHi (neural)"), - YUJIN_NEURAL_("YuJin (neural)"), - OSMAN_NEURAL_("Osman (neural)"), - YASMIN_NEURAL_("Yasmin (neural)"), - MIDHUN_NEURAL_("Midhun (neural)"), - SOBHANA_NEURAL_("Sobhana (neural)"), - FINN_NEURAL_("Finn (neural)"), - ISELIN_NEURAL_("Iselin (neural)"), - PERNILLE_NEURAL_("Pernille (neural)"), - AGNIESZKA_NEURAL_("Agnieszka (neural)"), - MAREK_NEURAL_("Marek (neural)"), - ZOFIA_NEURAL_("Zofia (neural)"), - DUARTE_NEURAL_("Duarte (neural)"), - FERNANDA_NEURAL_("Fernanda (neural)"), - RAQUEL_NEURAL_("Raquel (neural)"), - ANTONIO_NEURAL_("Antonio (neural)"), - BRENDA_NEURAL_("Brenda (neural)"), - DONATO_NEURAL_("Donato (neural)"), - ELZA_NEURAL_("Elza (neural)"), - FABIO_NEURAL_("Fabio (neural)"), - FRANCISCA_NEURAL_("Francisca (neural)"), - GIOVANNA_NEURAL_("Giovanna (neural)"), - HUMBERTO_NEURAL_("Humberto (neural)"), - JULIO_NEURAL_("Julio (neural)"), - LEILA_NEURAL_("Leila (neural)"), - LETICIA_NEURAL_("Leticia (neural)"), - MANUELA_NEURAL_("Manuela (neural)"), - NICOLAU_NEURAL_("Nicolau (neural)"), - THALITA_NEURAL_("Thalita (neural)"), - VALERIO_NEURAL_("Valerio (neural)"), - YARA_NEURAL_("Yara (neural)"), - ALINA_NEURAL_("Alina (neural)"), - EMIL_NEURAL_("Emil (neural)"), - DARIYA_NEURAL_("Dariya (neural)"), - DMITRY_NEURAL_("Dmitry (neural)"), + SUSHMITA_BETA_("Sushmita (beta)"), SVETLANA_NEURAL_("Svetlana (neural)"), - LUKAS_NEURAL_("Lukas (neural)"), - VIKTORIA_NEURAL_("Viktoria (neural)"), - PETRA_NEURAL_("Petra (neural)"), - ROK_NEURAL_("Rok (neural)"), - ABRIL_NEURAL_("Abril (neural)"), - ALONSO_NEURAL_("Alonso (neural)"), - ALVARO_NEURAL_("Alvaro (neural)"), - ARNAU_NEURAL_("Arnau (neural)"), - DARIO_NEURAL_("Dario (neural)"), - ELIAS_NEURAL_("Elias (neural)"), - ELVIRA_NEURAL_("Elvira (neural)"), - ESTRELLA_NEURAL_("Estrella (neural)"), - IRENE_NEURAL_("Irene (neural)"), - LAIA_NEURAL_("Laia (neural)"), - LIA_NEURAL_("Lia (neural)"), - NIL_NEURAL_("Nil (neural)"), - PALOMA_NEURAL_("Paloma (neural)"), - SAUL_NEURAL_("Saul (neural)"), + SWARA_NEURAL_("Swara (neural)"), + SYLVIE_NEURAL_("Sylvie (neural)"), + TAKUMI("Takumi"), + TAMAS_NEURAL_("Tamas (neural)"), + TANISHAA_NEURAL_("Tanishaa (neural)"), + TANJA_NEURAL_("Tanja (neural)"), + TATYANA("Tatyana"), TEO_NEURAL_("Teo (neural)"), + THALITA_NEURAL_("Thalita (neural)"), + THIERRY_NEURAL_("Thierry (neural)"), + THOMAS_NEURAL_("Thomas (neural)"), + TIM_NEURAL_("Tim (neural)"), + TINA_NEURAL_("Tina (neural)"), + TOMAS_NEURAL_("Tomas (neural)"), + TONY_NEURAL_("Tony (neural)"), TRIANA_NEURAL_("Triana (neural)"), + TUAN_BETA_("Tuan (beta)"), + ULYANA("Ulyana"), + UZMA_NEURAL_("Uzma (neural)"), + VALERIO_NEURAL_("Valerio (neural)"), + VALLUVAR_NEURAL_("Valluvar (neural)"), VERA_NEURAL_("Vera (neural)"), + VICKI("Vicki"), + VIJAY_BETA_("Vijay (beta)"), + VIKTORIA_NEURAL_("Viktoria (neural)"), + VISHNU_BETA_("Vishnu (beta)"), + VITORIA("Vitoria"), + VIVIENNE_NEURAL_("Vivienne (neural)"), + VLASTA_NEURAL_("Vlasta (neural)"), + WANLUNG_NEURAL_("WanLung (neural)"), + WANG_BETA_("Wang (beta)"), + WILLIAM_NEURAL_("William (neural)"), + XIAOCHEN_NEURAL_("Xiaochen (neural)"), + XIAOHAN_NEURAL_("Xiaohan (neural)"), + XIAOMENG_NEURAL_("Xiaomeng (neural)"), + XIAOMO_NEURAL_("Xiaomo (neural)"), + XIAOQIU_NEURAL_("Xiaoqiu (neural)"), + XIAOROU_NEURAL_("Xiaorou (neural)"), + XIAORUI_NEURAL_("Xiaorui (neural)"), + XIAOXIAO_NEURAL_("Xiaoxiao (neural)"), + XIAOYAN_NEURAL_("Xiaoyan (neural)"), + XIAOYI_NEURAL_("Xiaoyi (neural)"), + XIAOZHEN_NEURAL_("Xiaozhen (neural)"), XIMENA_NEURAL_("Ximena (neural)"), - BEATRIZ_NEURAL_("Beatriz (neural)"), - CANDELA_NEURAL_("Candela (neural)"), - CARLOTA_NEURAL_("Carlota (neural)"), - CECILIO_NEURAL_("Cecilio (neural)"), - DALIA_NEURAL_("Dalia (neural)"), - GERARDO_NEURAL_("Gerardo (neural)"), - JORGE_NEURAL_("Jorge (neural)"), - LARISSA_NEURAL_("Larissa (neural)"), - LIBERTO_NEURAL_("Liberto (neural)"), - LUCIANO_NEURAL_("Luciano (neural)"), - MARINA_NEURAL_("Marina (neural)"), - NURIA_NEURAL_("Nuria (neural)"), - PELAYO_NEURAL_("Pelayo (neural)"), - RENATA_NEURAL_("Renata (neural)"), YAGO_NEURAL_("Yago (neural)"), - ELENA_NEURAL_("Elena (neural)"), - TOMAS_NEURAL_("Tomas (neural)"), - HILLEVI_NEURAL_("Hillevi (neural)"), - MATTIAS_NEURAL_("Mattias (neural)"), - SOFIE_NEURAL_("Sofie (neural)"), - PALLAVI_NEURAL_("Pallavi (neural)"), - VALLUVAR_NEURAL_("Valluvar (neural)"), - MOHAN_NEURAL_("Mohan (neural)"), - SHRUTI_NEURAL_("Shruti (neural)"), - ACHARA_NEURAL_("Achara (neural)"), - NIWAT_NEURAL_("Niwat (neural)"), - PREMWADEE_NEURAL_("Premwadee (neural)"), - AHMET_NEURAL_("Ahmet (neural)"), - EMEL_NEURAL_("Emel (neural)"), - OSTAP_NEURAL_("Ostap (neural)"), - POLINA_NEURAL_("Polina (neural)"), - HOAIMY_NEURAL_("HoaiMy (neural)"), - NAMMINH_NEURAL_("NamMinh (neural)"), - ALED_NEURAL_("Aled (neural)"), - NIA_NEURAL_("Nia (neural)"), - MOUNA_NEURAL_("Mouna (neural)"), - JAMAL_NEURAL_("Jamal (neural)"), - UZMA_NEURAL_("Uzma (neural)"), - ASAD_NEURAL_("Asad (neural)"), - AAROHI_NEURAL_("Aarohi (neural)"), - MANOHAR_NEURAL_("Manohar (neural)"), - ZURI_NEURAL_("Zuri (neural)"), - RAFIKI_NEURAL_("Rafiki (neural)"), - REHEMA_NEURAL_("Rehema (neural)"), - DAUDI_NEURAL_("Daudi (neural)"); + YARA_NEURAL_("Yara (neural)"), + YASMIN_NEURAL_("Yasmin (neural)"), + YOSEF("Yosef"), + YUJIN_NEURAL_("YuJin (neural)"), + YUNJHE_NEURAL_("YunJhe (neural)"), + YUNFENG_NEURAL_("Yunfeng (neural)"), + YUNHAO_NEURAL_("Yunhao (neural)"), + YUNJIAN_NEURAL_("Yunjian (neural)"), + YUNJIE_NEURAL_("Yunjie (neural)"), + YUNXI_NEURAL_("Yunxi (neural)"), + YUNXIA_NEURAL_("Yunxia (neural)"), + YUNYANG_NEURAL_("Yunyang (neural)"), + YUNYE_NEURAL_("Yunye (neural)"), + YUNZE_NEURAL_("Yunze (neural)"), + YVES_NEURAL_("Yves (neural)"), + YVETTE_NEURAL_("Yvette (neural)"), + ZARIYAH_NEURAL_("Zariyah (neural)"), + ZEINA("Zeina"), + ZHANG_BETA_("Zhang (beta)"), + ZHIYU("Zhiyu"), + ZOFIA_NEURAL_("Zofia (neural)"), + ZURI_NEURAL_("Zuri (neural)"); private final String value; diff --git a/src/main/java/com/infobip/model/CallsAddress.java b/src/main/java/com/infobip/model/CallsAddress.java new file mode 100644 index 0000000..777b450 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsAddress.java @@ -0,0 +1,501 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Address of an Emergency Service. + */ +public class CallsAddress { + + private String name; + + private String streetName; + + private String streetNumber; + + private String city; + + private String countryCode; + + private String stateCode; + + private String zipCode; + + private CallsDirection direction; + + private String suite; + + /** + * Sets name. + *

+ * Field description: + * Emergency Service address name. + *

+ * The field is required. + * + * @param name + * @return This {@link CallsAddress instance}. + */ + public CallsAddress name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * Emergency Service address name. + *

+ * The field is required. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * Emergency Service address name. + *

+ * The field is required. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets streetName. + *

+ * Field description: + * Emergency Service address street. + *

+ * The field is required. + * + * @param streetName + * @return This {@link CallsAddress instance}. + */ + public CallsAddress streetName(String streetName) { + this.streetName = streetName; + return this; + } + + /** + * Returns streetName. + *

+ * Field description: + * Emergency Service address street. + *

+ * The field is required. + * + * @return streetName + */ + @JsonProperty("streetName") + public String getStreetName() { + return streetName; + } + + /** + * Sets streetName. + *

+ * Field description: + * Emergency Service address street. + *

+ * The field is required. + * + * @param streetName + */ + @JsonProperty("streetName") + public void setStreetName(String streetName) { + this.streetName = streetName; + } + + /** + * Sets streetNumber. + *

+ * Field description: + * Emergency Service address street number. + *

+ * The field is required. + * + * @param streetNumber + * @return This {@link CallsAddress instance}. + */ + public CallsAddress streetNumber(String streetNumber) { + this.streetNumber = streetNumber; + return this; + } + + /** + * Returns streetNumber. + *

+ * Field description: + * Emergency Service address street number. + *

+ * The field is required. + * + * @return streetNumber + */ + @JsonProperty("streetNumber") + public String getStreetNumber() { + return streetNumber; + } + + /** + * Sets streetNumber. + *

+ * Field description: + * Emergency Service address street number. + *

+ * The field is required. + * + * @param streetNumber + */ + @JsonProperty("streetNumber") + public void setStreetNumber(String streetNumber) { + this.streetNumber = streetNumber; + } + + /** + * Sets city. + *

+ * Field description: + * Emergency Service address city. + *

+ * The field is required. + * + * @param city + * @return This {@link CallsAddress instance}. + */ + public CallsAddress city(String city) { + this.city = city; + return this; + } + + /** + * Returns city. + *

+ * Field description: + * Emergency Service address city. + *

+ * The field is required. + * + * @return city + */ + @JsonProperty("city") + public String getCity() { + return city; + } + + /** + * Sets city. + *

+ * Field description: + * Emergency Service address city. + *

+ * The field is required. + * + * @param city + */ + @JsonProperty("city") + public void setCity(String city) { + this.city = city; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Emergency Service address country code. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link CallsAddress instance}. + */ + public CallsAddress countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Emergency Service address country code. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Emergency Service address country code. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets stateCode. + *

+ * Field description: + * Emergency Service address state code. + *

+ * The field is required. + * + * @param stateCode + * @return This {@link CallsAddress instance}. + */ + public CallsAddress stateCode(String stateCode) { + this.stateCode = stateCode; + return this; + } + + /** + * Returns stateCode. + *

+ * Field description: + * Emergency Service address state code. + *

+ * The field is required. + * + * @return stateCode + */ + @JsonProperty("stateCode") + public String getStateCode() { + return stateCode; + } + + /** + * Sets stateCode. + *

+ * Field description: + * Emergency Service address state code. + *

+ * The field is required. + * + * @param stateCode + */ + @JsonProperty("stateCode") + public void setStateCode(String stateCode) { + this.stateCode = stateCode; + } + + /** + * Sets zipCode. + *

+ * Field description: + * Emergency Service address zip code. + *

+ * The field is required. + * + * @param zipCode + * @return This {@link CallsAddress instance}. + */ + public CallsAddress zipCode(String zipCode) { + this.zipCode = zipCode; + return this; + } + + /** + * Returns zipCode. + *

+ * Field description: + * Emergency Service address zip code. + *

+ * The field is required. + * + * @return zipCode + */ + @JsonProperty("zipCode") + public String getZipCode() { + return zipCode; + } + + /** + * Sets zipCode. + *

+ * Field description: + * Emergency Service address zip code. + *

+ * The field is required. + * + * @param zipCode + */ + @JsonProperty("zipCode") + public void setZipCode(String zipCode) { + this.zipCode = zipCode; + } + + /** + * Sets direction. + * + * @param direction + * @return This {@link CallsAddress instance}. + */ + public CallsAddress direction(CallsDirection direction) { + this.direction = direction; + return this; + } + + /** + * Returns direction. + * + * @return direction + */ + @JsonProperty("direction") + public CallsDirection getDirection() { + return direction; + } + + /** + * Sets direction. + * + * @param direction + */ + @JsonProperty("direction") + public void setDirection(CallsDirection direction) { + this.direction = direction; + } + + /** + * Sets suite. + *

+ * Field description: + * Emergency Service address suite. + * + * @param suite + * @return This {@link CallsAddress instance}. + */ + public CallsAddress suite(String suite) { + this.suite = suite; + return this; + } + + /** + * Returns suite. + *

+ * Field description: + * Emergency Service address suite. + * + * @return suite + */ + @JsonProperty("suite") + public String getSuite() { + return suite; + } + + /** + * Sets suite. + *

+ * Field description: + * Emergency Service address suite. + * + * @param suite + */ + @JsonProperty("suite") + public void setSuite(String suite) { + this.suite = suite; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsAddress callsAddress = (CallsAddress) o; + return Objects.equals(this.name, callsAddress.name) + && Objects.equals(this.streetName, callsAddress.streetName) + && Objects.equals(this.streetNumber, callsAddress.streetNumber) + && Objects.equals(this.city, callsAddress.city) + && Objects.equals(this.countryCode, callsAddress.countryCode) + && Objects.equals(this.stateCode, callsAddress.stateCode) + && Objects.equals(this.zipCode, callsAddress.zipCode) + && Objects.equals(this.direction, callsAddress.direction) + && Objects.equals(this.suite, callsAddress.suite); + } + + @Override + public int hashCode() { + return Objects.hash(name, streetName, streetNumber, city, countryCode, stateCode, zipCode, direction, suite); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsAddress {") + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" streetName: ") + .append(toIndentedString(streetName)) + .append(newLine) + .append(" streetNumber: ") + .append(toIndentedString(streetNumber)) + .append(newLine) + .append(" city: ") + .append(toIndentedString(city)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" stateCode: ") + .append(toIndentedString(stateCode)) + .append(newLine) + .append(" zipCode: ") + .append(toIndentedString(zipCode)) + .append(newLine) + .append(" direction: ") + .append(toIndentedString(direction)) + .append(newLine) + .append(" suite: ") + .append(toIndentedString(suite)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsClickToCallMessage.java b/src/main/java/com/infobip/model/CallsClickToCallMessage.java index 8273dca..b9abc0d 100644 --- a/src/main/java/com/infobip/model/CallsClickToCallMessage.java +++ b/src/main/java/com/infobip/model/CallsClickToCallMessage.java @@ -657,7 +657,7 @@ public void setRetry(CallsRetry retry) { * Sets text. *

* Field description: - * Text of the message that will be played before call transfer. + * Text of the message that will be played before call transfer. SSML (Speech Synthesis Markup Language) is supported and can be used to fully customize pronunciation of the provided text. * * @param text * @return This {@link CallsClickToCallMessage instance}. @@ -671,7 +671,7 @@ public CallsClickToCallMessage text(String text) { * Returns text. *

* Field description: - * Text of the message that will be played before call transfer. + * Text of the message that will be played before call transfer. SSML (Speech Synthesis Markup Language) is supported and can be used to fully customize pronunciation of the provided text. * * @return text */ @@ -684,7 +684,7 @@ public String getText() { * Sets text. *

* Field description: - * Text of the message that will be played before call transfer. + * Text of the message that will be played before call transfer. SSML (Speech Synthesis Markup Language) is supported and can be used to fully customize pronunciation of the provided text. * * @param text */ diff --git a/src/main/java/com/infobip/model/CallsCnam.java b/src/main/java/com/infobip/model/CallsCnam.java new file mode 100644 index 0000000..710cd86 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsCnam.java @@ -0,0 +1,127 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents CallsCnam model. + */ +public class CallsCnam { + + private CallsCnamStorage storage; + + private CallsCnamDelivery delivery; + + /** + * Sets storage. + * + * @param storage + * @return This {@link CallsCnam instance}. + */ + public CallsCnam storage(CallsCnamStorage storage) { + this.storage = storage; + return this; + } + + /** + * Returns storage. + * + * @return storage + */ + @JsonProperty("storage") + public CallsCnamStorage getStorage() { + return storage; + } + + /** + * Sets storage. + * + * @param storage + */ + @JsonProperty("storage") + public void setStorage(CallsCnamStorage storage) { + this.storage = storage; + } + + /** + * Sets delivery. + * + * @param delivery + * @return This {@link CallsCnam instance}. + */ + public CallsCnam delivery(CallsCnamDelivery delivery) { + this.delivery = delivery; + return this; + } + + /** + * Returns delivery. + * + * @return delivery + */ + @JsonProperty("delivery") + public CallsCnamDelivery getDelivery() { + return delivery; + } + + /** + * Sets delivery. + * + * @param delivery + */ + @JsonProperty("delivery") + public void setDelivery(CallsCnamDelivery delivery) { + this.delivery = delivery; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsCnam callsCnam = (CallsCnam) o; + return Objects.equals(this.storage, callsCnam.storage) && Objects.equals(this.delivery, callsCnam.delivery); + } + + @Override + public int hashCode() { + return Objects.hash(storage, delivery); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsCnam {") + .append(newLine) + .append(" storage: ") + .append(toIndentedString(storage)) + .append(newLine) + .append(" delivery: ") + .append(toIndentedString(delivery)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsCnamDelivery.java b/src/main/java/com/infobip/model/CallsCnamDelivery.java new file mode 100644 index 0000000..2dccc27 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsCnamDelivery.java @@ -0,0 +1,100 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * CNAM Delivery is enabled on your DID at an additional charge that allows you to see the caller identification of the person calling you. + */ +public class CallsCnamDelivery { + + private Boolean enabled; + + /** + * Sets enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + * + * @param enabled + * @return This {@link CallsCnamDelivery instance}. + */ + public CallsCnamDelivery enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Returns enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + * + * @return enabled + */ + @JsonProperty("enabled") + public Boolean getEnabled() { + return enabled; + } + + /** + * Sets enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + * + * @param enabled + */ + @JsonProperty("enabled") + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsCnamDelivery callsCnamDelivery = (CallsCnamDelivery) o; + return Objects.equals(this.enabled, callsCnamDelivery.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsCnamDelivery {") + .append(newLine) + .append(" enabled: ") + .append(toIndentedString(enabled)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsCnamDeliveryStatus.java b/src/main/java/com/infobip/model/CallsCnamDeliveryStatus.java new file mode 100644 index 0000000..aefa6a4 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsCnamDeliveryStatus.java @@ -0,0 +1,137 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Current status of CNAM Delivery configuration. + */ +public class CallsCnamDeliveryStatus { + + private CallsStatus status; + + private String reason; + + /** + * Sets status. + * + * @param status + * @return This {@link CallsCnamDeliveryStatus instance}. + */ + public CallsCnamDeliveryStatus status(CallsStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + * + * @return status + */ + @JsonProperty("status") + public CallsStatus getStatus() { + return status; + } + + /** + * Sets status. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(CallsStatus status) { + this.status = status; + } + + /** + * Sets reason. + *

+ * Field description: + * Description of the status. + * + * @param reason + * @return This {@link CallsCnamDeliveryStatus instance}. + */ + public CallsCnamDeliveryStatus reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Returns reason. + *

+ * Field description: + * Description of the status. + * + * @return reason + */ + @JsonProperty("reason") + public String getReason() { + return reason; + } + + /** + * Sets reason. + *

+ * Field description: + * Description of the status. + * + * @param reason + */ + @JsonProperty("reason") + public void setReason(String reason) { + this.reason = reason; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsCnamDeliveryStatus callsCnamDeliveryStatus = (CallsCnamDeliveryStatus) o; + return Objects.equals(this.status, callsCnamDeliveryStatus.status) + && Objects.equals(this.reason, callsCnamDeliveryStatus.reason); + } + + @Override + public int hashCode() { + return Objects.hash(status, reason); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsCnamDeliveryStatus {") + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" reason: ") + .append(toIndentedString(reason)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsCnamStorage.java b/src/main/java/com/infobip/model/CallsCnamStorage.java new file mode 100644 index 0000000..81572f2 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsCnamStorage.java @@ -0,0 +1,152 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * CNAM Storage is an up to 15-character name that will identify you to the person that you are calling if they subscribe to caller ID. + */ +public class CallsCnamStorage { + + private Boolean enabled; + + private String name; + + /** + * Sets enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + * + * @param enabled + * @return This {@link CallsCnamStorage instance}. + */ + public CallsCnamStorage enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Returns enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + * + * @return enabled + */ + @JsonProperty("enabled") + public Boolean getEnabled() { + return enabled; + } + + /** + * Sets enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + * + * @param enabled + */ + @JsonProperty("enabled") + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Sets name. + *

+ * Field description: + * Name that will identify you to the person that you are calling. + *

+ * The field is required. + * + * @param name + * @return This {@link CallsCnamStorage instance}. + */ + public CallsCnamStorage name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * Name that will identify you to the person that you are calling. + *

+ * The field is required. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * Name that will identify you to the person that you are calling. + *

+ * The field is required. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsCnamStorage callsCnamStorage = (CallsCnamStorage) o; + return Objects.equals(this.enabled, callsCnamStorage.enabled) + && Objects.equals(this.name, callsCnamStorage.name); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, name); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsCnamStorage {") + .append(newLine) + .append(" enabled: ") + .append(toIndentedString(enabled)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsCnamStorageStatus.java b/src/main/java/com/infobip/model/CallsCnamStorageStatus.java new file mode 100644 index 0000000..f77f22a --- /dev/null +++ b/src/main/java/com/infobip/model/CallsCnamStorageStatus.java @@ -0,0 +1,137 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Current status of CNAM Storage configuration. + */ +public class CallsCnamStorageStatus { + + private CallsStatus status; + + private String reason; + + /** + * Sets status. + * + * @param status + * @return This {@link CallsCnamStorageStatus instance}. + */ + public CallsCnamStorageStatus status(CallsStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + * + * @return status + */ + @JsonProperty("status") + public CallsStatus getStatus() { + return status; + } + + /** + * Sets status. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(CallsStatus status) { + this.status = status; + } + + /** + * Sets reason. + *

+ * Field description: + * Description of the status. + * + * @param reason + * @return This {@link CallsCnamStorageStatus instance}. + */ + public CallsCnamStorageStatus reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Returns reason. + *

+ * Field description: + * Description of the status. + * + * @return reason + */ + @JsonProperty("reason") + public String getReason() { + return reason; + } + + /** + * Sets reason. + *

+ * Field description: + * Description of the status. + * + * @param reason + */ + @JsonProperty("reason") + public void setReason(String reason) { + this.reason = reason; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsCnamStorageStatus callsCnamStorageStatus = (CallsCnamStorageStatus) o; + return Objects.equals(this.status, callsCnamStorageStatus.status) + && Objects.equals(this.reason, callsCnamStorageStatus.reason); + } + + @Override + public int hashCode() { + return Objects.hash(status, reason); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsCnamStorageStatus {") + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" reason: ") + .append(toIndentedString(reason)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsDialogPlayRequest.java b/src/main/java/com/infobip/model/CallsDialogPlayRequest.java index ad1a924..3f28c67 100644 --- a/src/main/java/com/infobip/model/CallsDialogPlayRequest.java +++ b/src/main/java/com/infobip/model/CallsDialogPlayRequest.java @@ -63,6 +63,8 @@ public void setLoopCount(Integer loopCount) { /** * Sets content. + *

+ * The field is required. * * @param content * @return This {@link CallsDialogPlayRequest instance}. @@ -74,6 +76,8 @@ public CallsDialogPlayRequest content(CallsPlayContent content) { /** * Returns content. + *

+ * The field is required. * * @return content */ @@ -84,6 +88,8 @@ public CallsPlayContent getContent() { /** * Sets content. + *

+ * The field is required. * * @param content */ diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingPage.java b/src/main/java/com/infobip/model/CallsDialogRecordingPage.java index 8383227..9ccb8ef 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecordingPage.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingPage.java @@ -19,7 +19,7 @@ */ public class CallsDialogRecordingPage { - private List results = null; + private List results = null; private PageInfo paging; @@ -32,7 +32,7 @@ public class CallsDialogRecordingPage { * @param results * @return This {@link CallsDialogRecordingPage instance}. */ - public CallsDialogRecordingPage results(List results) { + public CallsDialogRecordingPage results(List results) { this.results = results; return this; } @@ -46,7 +46,7 @@ public CallsDialogRecordingPage results(List resul * @param resultsItem The item to be added to the list. * @return This {@link CallsDialogRecordingPage instance}. */ - public CallsDialogRecordingPage addResultsItem(CallsDialogRecordingResponse resultsItem) { + public CallsDialogRecordingPage addResultsItem(CallsPublicDialogRecording resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -63,7 +63,7 @@ public CallsDialogRecordingPage addResultsItem(CallsDialogRecordingResponse resu * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -76,7 +76,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java b/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java deleted file mode 100644 index 9ebd5f7..0000000 --- a/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * This class is auto generated from the Infobip OpenAPI specification - * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), - * powered by the OpenAPI Generator (https://openapi-generator.tech). - * - * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide - * or contact us @ support@infobip.com. - */ - -package com.infobip.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Represents CallsDialogRecordingResponse model. - */ -public class CallsDialogRecordingResponse { - - private String dialogId; - - private String callsConfigurationId; - - private Platform platform; - - private List composedFiles = null; - - private List callRecordings = null; - - private OffsetDateTime startTime; - - private OffsetDateTime endTime; - - /** - * Sets dialogId. - *

- * Field description: - * Unique dialog ID. - * - * @param dialogId - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse dialogId(String dialogId) { - this.dialogId = dialogId; - return this; - } - - /** - * Returns dialogId. - *

- * Field description: - * Unique dialog ID. - * - * @return dialogId - */ - @JsonProperty("dialogId") - public String getDialogId() { - return dialogId; - } - - /** - * Sets dialogId. - *

- * Field description: - * Unique dialog ID. - * - * @param dialogId - */ - @JsonProperty("dialogId") - public void setDialogId(String dialogId) { - this.dialogId = dialogId; - } - - /** - * Sets callsConfigurationId. - *

- * Field description: - * Calls Configuration ID. - * - * @param callsConfigurationId - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse callsConfigurationId(String callsConfigurationId) { - this.callsConfigurationId = callsConfigurationId; - return this; - } - - /** - * Returns callsConfigurationId. - *

- * Field description: - * Calls Configuration ID. - * - * @return callsConfigurationId - */ - @JsonProperty("callsConfigurationId") - public String getCallsConfigurationId() { - return callsConfigurationId; - } - - /** - * Sets callsConfigurationId. - *

- * Field description: - * Calls Configuration ID. - * - * @param callsConfigurationId - */ - @JsonProperty("callsConfigurationId") - public void setCallsConfigurationId(String callsConfigurationId) { - this.callsConfigurationId = callsConfigurationId; - } - - /** - * Sets platform. - * - * @param platform - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse platform(Platform platform) { - this.platform = platform; - return this; - } - - /** - * Returns platform. - * - * @return platform - */ - @JsonProperty("platform") - public Platform getPlatform() { - return platform; - } - - /** - * Sets platform. - * - * @param platform - */ - @JsonProperty("platform") - public void setPlatform(Platform platform) { - this.platform = platform; - } - - /** - * Sets composedFiles. - *

- * Field description: - * File(s) with a recording of both dialog participants. - * - * @param composedFiles - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse composedFiles(List composedFiles) { - this.composedFiles = composedFiles; - return this; - } - - /** - * Adds and item into composedFiles. - *

- * Field description: - * File(s) with a recording of both dialog participants. - * - * @param composedFilesItem The item to be added to the list. - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse addComposedFilesItem(CallsPublicRecordingFile composedFilesItem) { - if (this.composedFiles == null) { - this.composedFiles = new ArrayList<>(); - } - this.composedFiles.add(composedFilesItem); - return this; - } - - /** - * Returns composedFiles. - *

- * Field description: - * File(s) with a recording of both dialog participants. - * - * @return composedFiles - */ - @JsonProperty("composedFiles") - public List getComposedFiles() { - return composedFiles; - } - - /** - * Sets composedFiles. - *

- * Field description: - * File(s) with a recording of both dialog participants. - * - * @param composedFiles - */ - @JsonProperty("composedFiles") - public void setComposedFiles(List composedFiles) { - this.composedFiles = composedFiles; - } - - /** - * Sets callRecordings. - *

- * Field description: - * File(s) with a recording of one dialog participant. - * - * @param callRecordings - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse callRecordings(List callRecordings) { - this.callRecordings = callRecordings; - return this; - } - - /** - * Adds and item into callRecordings. - *

- * Field description: - * File(s) with a recording of one dialog participant. - * - * @param callRecordingsItem The item to be added to the list. - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse addCallRecordingsItem(CallsPublicRecording callRecordingsItem) { - if (this.callRecordings == null) { - this.callRecordings = new ArrayList<>(); - } - this.callRecordings.add(callRecordingsItem); - return this; - } - - /** - * Returns callRecordings. - *

- * Field description: - * File(s) with a recording of one dialog participant. - * - * @return callRecordings - */ - @JsonProperty("callRecordings") - public List getCallRecordings() { - return callRecordings; - } - - /** - * Sets callRecordings. - *

- * Field description: - * File(s) with a recording of one dialog participant. - * - * @param callRecordings - */ - @JsonProperty("callRecordings") - public void setCallRecordings(List callRecordings) { - this.callRecordings = callRecordings; - } - - /** - * Sets startTime. - *

- * Field description: - * Date and time when the (first) recording started. - * - * @param startTime - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse startTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Returns startTime. - *

- * Field description: - * Date and time when the (first) recording started. - * - * @return startTime - */ - @JsonProperty("startTime") - public OffsetDateTime getStartTime() { - return startTime; - } - - /** - * Sets startTime. - *

- * Field description: - * Date and time when the (first) recording started. - * - * @param startTime - */ - @JsonProperty("startTime") - public void setStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - } - - /** - * Sets endTime. - *

- * Field description: - * Date and time when the (last) recording ended. - * - * @param endTime - * @return This {@link CallsDialogRecordingResponse instance}. - */ - public CallsDialogRecordingResponse endTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Returns endTime. - *

- * Field description: - * Date and time when the (last) recording ended. - * - * @return endTime - */ - @JsonProperty("endTime") - public OffsetDateTime getEndTime() { - return endTime; - } - - /** - * Sets endTime. - *

- * Field description: - * Date and time when the (last) recording ended. - * - * @param endTime - */ - @JsonProperty("endTime") - public void setEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CallsDialogRecordingResponse callsDialogRecordingResponse = (CallsDialogRecordingResponse) o; - return Objects.equals(this.dialogId, callsDialogRecordingResponse.dialogId) - && Objects.equals(this.callsConfigurationId, callsDialogRecordingResponse.callsConfigurationId) - && Objects.equals(this.platform, callsDialogRecordingResponse.platform) - && Objects.equals(this.composedFiles, callsDialogRecordingResponse.composedFiles) - && Objects.equals(this.callRecordings, callsDialogRecordingResponse.callRecordings) - && Objects.equals(this.startTime, callsDialogRecordingResponse.startTime) - && Objects.equals(this.endTime, callsDialogRecordingResponse.endTime); - } - - @Override - public int hashCode() { - return Objects.hash( - dialogId, callsConfigurationId, platform, composedFiles, callRecordings, startTime, endTime); - } - - @Override - public String toString() { - String newLine = System.lineSeparator(); - return new StringBuilder() - .append("class CallsDialogRecordingResponse {") - .append(newLine) - .append(" dialogId: ") - .append(toIndentedString(dialogId)) - .append(newLine) - .append(" callsConfigurationId: ") - .append(toIndentedString(callsConfigurationId)) - .append(newLine) - .append(" platform: ") - .append(toIndentedString(platform)) - .append(newLine) - .append(" composedFiles: ") - .append(toIndentedString(composedFiles)) - .append(newLine) - .append(" callRecordings: ") - .append(toIndentedString(callRecordings)) - .append(newLine) - .append(" startTime: ") - .append(toIndentedString(startTime)) - .append(newLine) - .append(" endTime: ") - .append(toIndentedString(endTime)) - .append(newLine) - .append("}") - .toString(); - } - - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - String lineSeparator = System.lineSeparator(); - String lineSeparatorFollowedByIndentation = lineSeparator + " "; - return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); - } -} diff --git a/src/main/java/com/infobip/model/CallsDirection.java b/src/main/java/com/infobip/model/CallsDirection.java new file mode 100644 index 0000000..8918b1f --- /dev/null +++ b/src/main/java/com/infobip/model/CallsDirection.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Emergency Service address direction. + */ +public enum CallsDirection { + NORTH("NORTH"), + EAST("EAST"), + SOUTH("SOUTH"), + WEST("WEST"); + + private final String value; + + CallsDirection(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CallsDirection fromValue(String value) { + for (CallsDirection enumElement : CallsDirection.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/CallsEmergencyAddress.java b/src/main/java/com/infobip/model/CallsEmergencyAddress.java new file mode 100644 index 0000000..67d2b65 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsEmergencyAddress.java @@ -0,0 +1,149 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents CallsEmergencyAddress model. + */ +public class CallsEmergencyAddress { + + private Boolean enabled = false; + + private CallsAddress address; + + /** + * Sets enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + *

+ * The field is required. + * + * @param enabled + * @return This {@link CallsEmergencyAddress instance}. + */ + public CallsEmergencyAddress enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Returns enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + *

+ * The field is required. + * + * @return enabled + */ + @JsonProperty("enabled") + public Boolean getEnabled() { + return enabled; + } + + /** + * Sets enabled. + *

+ * Field description: + * Indicates whether configuration is enabled or not. + *

+ * The field is required. + * + * @param enabled + */ + @JsonProperty("enabled") + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + * @return This {@link CallsEmergencyAddress instance}. + */ + public CallsEmergencyAddress address(CallsAddress address) { + this.address = address; + return this; + } + + /** + * Returns address. + *

+ * The field is required. + * + * @return address + */ + @JsonProperty("address") + public CallsAddress getAddress() { + return address; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + */ + @JsonProperty("address") + public void setAddress(CallsAddress address) { + this.address = address; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsEmergencyAddress callsEmergencyAddress = (CallsEmergencyAddress) o; + return Objects.equals(this.enabled, callsEmergencyAddress.enabled) + && Objects.equals(this.address, callsEmergencyAddress.address); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, address); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsEmergencyAddress {") + .append(newLine) + .append(" enabled: ") + .append(toIndentedString(enabled)) + .append(newLine) + .append(" address: ") + .append(toIndentedString(address)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsEmergencyAddressStatus.java b/src/main/java/com/infobip/model/CallsEmergencyAddressStatus.java new file mode 100644 index 0000000..d2e3c69 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsEmergencyAddressStatus.java @@ -0,0 +1,91 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents CallsEmergencyAddressStatus model. + */ +public class CallsEmergencyAddressStatus { + + private NumbersStatusResponse emergencyService; + + /** + * Sets emergencyService. + * + * @param emergencyService + * @return This {@link CallsEmergencyAddressStatus instance}. + */ + public CallsEmergencyAddressStatus emergencyService(NumbersStatusResponse emergencyService) { + this.emergencyService = emergencyService; + return this; + } + + /** + * Returns emergencyService. + * + * @return emergencyService + */ + @JsonProperty("emergencyService") + public NumbersStatusResponse getEmergencyService() { + return emergencyService; + } + + /** + * Sets emergencyService. + * + * @param emergencyService + */ + @JsonProperty("emergencyService") + public void setEmergencyService(NumbersStatusResponse emergencyService) { + this.emergencyService = emergencyService; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsEmergencyAddressStatus callsEmergencyAddressStatus = (CallsEmergencyAddressStatus) o; + return Objects.equals(this.emergencyService, callsEmergencyAddressStatus.emergencyService); + } + + @Override + public int hashCode() { + return Objects.hash(emergencyService); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsEmergencyAddressStatus {") + .append(newLine) + .append(" emergencyService: ") + .append(toIndentedString(emergencyService)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsLanguage.java b/src/main/java/com/infobip/model/CallsLanguage.java index ac74415..b80df84 100644 --- a/src/main/java/com/infobip/model/CallsLanguage.java +++ b/src/main/java/com/infobip/model/CallsLanguage.java @@ -13,75 +13,73 @@ import com.fasterxml.jackson.annotation.JsonValue; /** - * Text language. Must be defined for correct pronunciation. For more details on available languages and voices, see our [documentation](https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast). + * Text language. Must be defined for correct pronunciation. More info about available languages and voices can be found [here](https://www.infobip.com/docs/voice-and-video/getting-started#text-to-speech). */ public enum CallsLanguage { AR("ar"), - BN("bn"), + AR_MA("ar-ma"), BG("bg"), + BN("bn"), CA("ca"), - ZH_CN("zh-cn"), - ZH_TW("zh-tw"), - HR("hr"), CS("cs"), DA("da"), - NL("nl"), + DE("de"), + DE_AT("de-at"), + DE_CH("de-ch"), + EL("el"), EN("en"), EN_AU("en-au"), - EN_GB("en-gb"), EN_CA("en-ca"), - EN_IN("en-in"), - EN_IE("en-ie"), + EN_GB("en-gb"), EN_GB_WLS("en-gb-wls"), - EPO("epo"), - FIL_PH("fil-ph"), + EN_IE("en-ie"), + EN_IN("en-in"), + ES("es"), + ES_AR("es-ar"), + ES_MX("es-mx"), FI("fi"), + FIL_PH("fil-ph"), FR("fr"), FR_CA("fr-ca"), FR_CH("fr-ch"), - DE("de"), - DE_AT("de-at"), - DE_CH("de-ch"), - EL("el"), GU("gu"), HE("he"), HI("hi"), + HR("hr"), HU("hu"), - IS("is"), ID("id"), + IS("is"), IT("it"), JA("ja"), - KN("kn"), KK_KZ("kk-kz"), + KN("kn"), KO("ko"), - MS("ms"), ML("ml"), - NO("no"), + MR_IN("mr-in"), + MS("ms"), + NL("nl"), + FALSE("false"), PL("pl"), - PT_PT("pt-pt"), PT_BR("pt-br"), + PT_PT("pt-pt"), RO("ro"), RU("ru"), SK("sk"), SL("sl"), - ES("es"), - ES_AR("es-ar"), - ES_GL("es-gl"), - ES_MX("es-mx"), SV("sv"), + SW_KE("sw-ke"), + SW_TZ("sw-tz"), TA("ta"), TE("te"), TH("th"), TR("tr"), UK("uk"), + UR_PK("ur-pk"), UZ_UZ("uz-uz"), VI("vi"), WLS("wls"), - AR_MA("ar-ma"), - UR_PK("ur-pk"), - MR_IN("mr-in"), - SW_KE("sw-ke"), - SW_TZ("sw-tz"); + ZH_CN("zh-cn"), + ZH_TW("zh-tw"); private final String value; diff --git a/src/main/java/com/infobip/model/CallsPlayContent.java b/src/main/java/com/infobip/model/CallsPlayContent.java index 2cb9d9e..59dcdf4 100644 --- a/src/main/java/com/infobip/model/CallsPlayContent.java +++ b/src/main/java/com/infobip/model/CallsPlayContent.java @@ -26,6 +26,7 @@ @JsonSubTypes.Type(value = CallsFilePlayContent.class, name = "FILE"), @JsonSubTypes.Type(value = CallsRecordingPlayContent.class, name = "RECORDING"), @JsonSubTypes.Type(value = CallsTextPlayContent.class, name = "TEXT"), + @JsonSubTypes.Type(value = CallsTtyPlayContent.class, name = "TTY"), @JsonSubTypes.Type(value = CallsUrlPlayContent.class, name = "URL"), }) public abstract class CallsPlayContent { diff --git a/src/main/java/com/infobip/model/CallsPlayContentType.java b/src/main/java/com/infobip/model/CallsPlayContentType.java index 1811b17..1d294b5 100644 --- a/src/main/java/com/infobip/model/CallsPlayContentType.java +++ b/src/main/java/com/infobip/model/CallsPlayContentType.java @@ -19,7 +19,8 @@ public enum CallsPlayContentType { FILE("FILE"), URL("URL"), RECORDING("RECORDING"), - TEXT("TEXT"); + TEXT("TEXT"), + TTY("TTY"); private final String value; diff --git a/src/main/java/com/infobip/model/CallsPlayTty.java b/src/main/java/com/infobip/model/CallsPlayTty.java new file mode 100644 index 0000000..b5de7c1 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsPlayTty.java @@ -0,0 +1,189 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Play TTY action converts the provided text into Baudot tones and plays the generated audio, enabling the message to be displayed on a connected TTY device. This action is designed to support IVR scenarios adapted for users with hearing impairments. + */ +public class CallsPlayTty { + + private String playTty; + + private CallsPlayTtyOptions options; + + private Integer actionId; + + /** + * Sets playTty. + *

+ * Field description: + * Text that will be played in Baudot tones. The parameter can be constructed using variables. + *

+ * The field is required. + * + * @param playTty + * @return This {@link CallsPlayTty instance}. + */ + public CallsPlayTty playTty(String playTty) { + this.playTty = playTty; + return this; + } + + /** + * Returns playTty. + *

+ * Field description: + * Text that will be played in Baudot tones. The parameter can be constructed using variables. + *

+ * The field is required. + * + * @return playTty + */ + @JsonProperty("playTty") + public String getPlayTty() { + return playTty; + } + + /** + * Sets playTty. + *

+ * Field description: + * Text that will be played in Baudot tones. The parameter can be constructed using variables. + *

+ * The field is required. + * + * @param playTty + */ + @JsonProperty("playTty") + public void setPlayTty(String playTty) { + this.playTty = playTty; + } + + /** + * Sets options. + * + * @param options + * @return This {@link CallsPlayTty instance}. + */ + public CallsPlayTty options(CallsPlayTtyOptions options) { + this.options = options; + return this; + } + + /** + * Returns options. + * + * @return options + */ + @JsonProperty("options") + public CallsPlayTtyOptions getOptions() { + return options; + } + + /** + * Sets options. + * + * @param options + */ + @JsonProperty("options") + public void setOptions(CallsPlayTtyOptions options) { + this.options = options; + } + + /** + * Sets actionId. + *

+ * Field description: + * User-defined ID of an action that can be used with go-to action. + * + * @param actionId + * @return This {@link CallsPlayTty instance}. + */ + public CallsPlayTty actionId(Integer actionId) { + this.actionId = actionId; + return this; + } + + /** + * Returns actionId. + *

+ * Field description: + * User-defined ID of an action that can be used with go-to action. + * + * @return actionId + */ + @JsonProperty("actionId") + public Integer getActionId() { + return actionId; + } + + /** + * Sets actionId. + *

+ * Field description: + * User-defined ID of an action that can be used with go-to action. + * + * @param actionId + */ + @JsonProperty("actionId") + public void setActionId(Integer actionId) { + this.actionId = actionId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsPlayTty callsPlayTty = (CallsPlayTty) o; + return Objects.equals(this.playTty, callsPlayTty.playTty) + && Objects.equals(this.options, callsPlayTty.options) + && Objects.equals(this.actionId, callsPlayTty.actionId); + } + + @Override + public int hashCode() { + return Objects.hash(playTty, options, actionId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsPlayTty {") + .append(newLine) + .append(" playTty: ") + .append(toIndentedString(playTty)) + .append(newLine) + .append(" options: ") + .append(toIndentedString(options)) + .append(newLine) + .append(" actionId: ") + .append(toIndentedString(actionId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsPlayTtyOptions.java b/src/main/java/com/infobip/model/CallsPlayTtyOptions.java new file mode 100644 index 0000000..0c4ae4a --- /dev/null +++ b/src/main/java/com/infobip/model/CallsPlayTtyOptions.java @@ -0,0 +1,100 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents CallsPlayTtyOptions model. + */ +public class CallsPlayTtyOptions { + + private Integer loopCount; + + /** + * Sets loopCount. + *

+ * Field description: + * Number of times the message will be played. + * + * @param loopCount + * @return This {@link CallsPlayTtyOptions instance}. + */ + public CallsPlayTtyOptions loopCount(Integer loopCount) { + this.loopCount = loopCount; + return this; + } + + /** + * Returns loopCount. + *

+ * Field description: + * Number of times the message will be played. + * + * @return loopCount + */ + @JsonProperty("loopCount") + public Integer getLoopCount() { + return loopCount; + } + + /** + * Sets loopCount. + *

+ * Field description: + * Number of times the message will be played. + * + * @param loopCount + */ + @JsonProperty("loopCount") + public void setLoopCount(Integer loopCount) { + this.loopCount = loopCount; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsPlayTtyOptions callsPlayTtyOptions = (CallsPlayTtyOptions) o; + return Objects.equals(this.loopCount, callsPlayTtyOptions.loopCount); + } + + @Override + public int hashCode() { + return Objects.hash(loopCount); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsPlayTtyOptions {") + .append(newLine) + .append(" loopCount: ") + .append(toIndentedString(loopCount)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsPublicCnamStatus.java b/src/main/java/com/infobip/model/CallsPublicCnamStatus.java new file mode 100644 index 0000000..6aef9cf --- /dev/null +++ b/src/main/java/com/infobip/model/CallsPublicCnamStatus.java @@ -0,0 +1,128 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents CallsPublicCnamStatus model. + */ +public class CallsPublicCnamStatus { + + private CallsCnamStorageStatus storage; + + private CallsCnamDeliveryStatus delivery; + + /** + * Sets storage. + * + * @param storage + * @return This {@link CallsPublicCnamStatus instance}. + */ + public CallsPublicCnamStatus storage(CallsCnamStorageStatus storage) { + this.storage = storage; + return this; + } + + /** + * Returns storage. + * + * @return storage + */ + @JsonProperty("storage") + public CallsCnamStorageStatus getStorage() { + return storage; + } + + /** + * Sets storage. + * + * @param storage + */ + @JsonProperty("storage") + public void setStorage(CallsCnamStorageStatus storage) { + this.storage = storage; + } + + /** + * Sets delivery. + * + * @param delivery + * @return This {@link CallsPublicCnamStatus instance}. + */ + public CallsPublicCnamStatus delivery(CallsCnamDeliveryStatus delivery) { + this.delivery = delivery; + return this; + } + + /** + * Returns delivery. + * + * @return delivery + */ + @JsonProperty("delivery") + public CallsCnamDeliveryStatus getDelivery() { + return delivery; + } + + /** + * Sets delivery. + * + * @param delivery + */ + @JsonProperty("delivery") + public void setDelivery(CallsCnamDeliveryStatus delivery) { + this.delivery = delivery; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsPublicCnamStatus callsPublicCnamStatus = (CallsPublicCnamStatus) o; + return Objects.equals(this.storage, callsPublicCnamStatus.storage) + && Objects.equals(this.delivery, callsPublicCnamStatus.delivery); + } + + @Override + public int hashCode() { + return Objects.hash(storage, delivery); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsPublicCnamStatus {") + .append(newLine) + .append(" storage: ") + .append(toIndentedString(storage)) + .append(newLine) + .append(" delivery: ") + .append(toIndentedString(delivery)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsRecordingFailedProperties.java b/src/main/java/com/infobip/model/CallsRecordingFailedProperties.java index 37e0a7d..dc76ceb 100644 --- a/src/main/java/com/infobip/model/CallsRecordingFailedProperties.java +++ b/src/main/java/com/infobip/model/CallsRecordingFailedProperties.java @@ -10,6 +10,8 @@ package com.infobip.model; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; /** @@ -19,6 +21,8 @@ public class CallsRecordingFailedProperties { private String reason; + private Map recordingCustomData = null; + /** * Sets reason. *

@@ -59,6 +63,64 @@ public void setReason(String reason) { this.reason = reason; } + /** + * Sets recordingCustomData. + *

+ * Field description: + * Recording custom data. + * + * @param recordingCustomData + * @return This {@link CallsRecordingFailedProperties instance}. + */ + public CallsRecordingFailedProperties recordingCustomData(Map recordingCustomData) { + this.recordingCustomData = recordingCustomData; + return this; + } + + /** + * Puts and entry into recordingCustomData. + *

+ * Field description: + * Recording custom data. + * + * @param key The given key. + * @param recordingCustomDataItem The item to be associated with the given key. + * @return This {@link CallsRecordingFailedProperties instance}. + */ + public CallsRecordingFailedProperties putRecordingCustomDataItem(String key, String recordingCustomDataItem) { + if (this.recordingCustomData == null) { + this.recordingCustomData = new HashMap<>(); + } + this.recordingCustomData.put(key, recordingCustomDataItem); + return this; + } + + /** + * Returns recordingCustomData. + *

+ * Field description: + * Recording custom data. + * + * @return recordingCustomData + */ + @JsonProperty("recordingCustomData") + public Map getRecordingCustomData() { + return recordingCustomData; + } + + /** + * Sets recordingCustomData. + *

+ * Field description: + * Recording custom data. + * + * @param recordingCustomData + */ + @JsonProperty("recordingCustomData") + public void setRecordingCustomData(Map recordingCustomData) { + this.recordingCustomData = recordingCustomData; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -68,12 +130,13 @@ public boolean equals(Object o) { return false; } CallsRecordingFailedProperties callsRecordingFailedProperties = (CallsRecordingFailedProperties) o; - return Objects.equals(this.reason, callsRecordingFailedProperties.reason); + return Objects.equals(this.reason, callsRecordingFailedProperties.reason) + && Objects.equals(this.recordingCustomData, callsRecordingFailedProperties.recordingCustomData); } @Override public int hashCode() { - return Objects.hash(reason); + return Objects.hash(reason, recordingCustomData); } @Override @@ -85,6 +148,9 @@ public String toString() { .append(" reason: ") .append(toIndentedString(reason)) .append(newLine) + .append(" recordingCustomData: ") + .append(toIndentedString(recordingCustomData)) + .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/CallsSipTrunkRegistrationCredentials.java b/src/main/java/com/infobip/model/CallsSipTrunkRegisteredResetPasswordResponse.java similarity index 71% rename from src/main/java/com/infobip/model/CallsSipTrunkRegistrationCredentials.java rename to src/main/java/com/infobip/model/CallsSipTrunkRegisteredResetPasswordResponse.java index 8d447f7..5c56585 100644 --- a/src/main/java/com/infobip/model/CallsSipTrunkRegistrationCredentials.java +++ b/src/main/java/com/infobip/model/CallsSipTrunkRegisteredResetPasswordResponse.java @@ -13,14 +13,21 @@ import java.util.Objects; /** - * Represents CallsSipTrunkRegistrationCredentials model. + * Represents CallsSipTrunkRegisteredResetPasswordResponse model. */ -public class CallsSipTrunkRegistrationCredentials { +public class CallsSipTrunkRegisteredResetPasswordResponse extends CallsSipTrunkResetPasswordResponse { private String username; private String password; + /** + * Constructs a new {@link CallsSipTrunkRegisteredResetPasswordResponse} instance. + */ + public CallsSipTrunkRegisteredResetPasswordResponse() { + super("REGISTERED"); + } + /** * Sets username. *

@@ -28,9 +35,9 @@ public class CallsSipTrunkRegistrationCredentials { * Registration username. * * @param username - * @return This {@link CallsSipTrunkRegistrationCredentials instance}. + * @return This {@link CallsSipTrunkRegisteredResetPasswordResponse instance}. */ - public CallsSipTrunkRegistrationCredentials username(String username) { + public CallsSipTrunkRegisteredResetPasswordResponse username(String username) { this.username = username; return this; } @@ -68,9 +75,9 @@ public void setUsername(String username) { * New registration password. * * @param password - * @return This {@link CallsSipTrunkRegistrationCredentials instance}. + * @return This {@link CallsSipTrunkRegisteredResetPasswordResponse instance}. */ - public CallsSipTrunkRegistrationCredentials password(String password) { + public CallsSipTrunkRegisteredResetPasswordResponse password(String password) { this.password = password; return this; } @@ -109,22 +116,26 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CallsSipTrunkRegistrationCredentials callsSipTrunkRegistrationCredentials = - (CallsSipTrunkRegistrationCredentials) o; - return Objects.equals(this.username, callsSipTrunkRegistrationCredentials.username) - && Objects.equals(this.password, callsSipTrunkRegistrationCredentials.password); + CallsSipTrunkRegisteredResetPasswordResponse callsSipTrunkRegisteredResetPasswordResponse = + (CallsSipTrunkRegisteredResetPasswordResponse) o; + return Objects.equals(this.username, callsSipTrunkRegisteredResetPasswordResponse.username) + && Objects.equals(this.password, callsSipTrunkRegisteredResetPasswordResponse.password) + && super.equals(o); } @Override public int hashCode() { - return Objects.hash(username, password); + return Objects.hash(username, password, super.hashCode()); } @Override public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class CallsSipTrunkRegistrationCredentials {") + .append("class CallsSipTrunkRegisteredResetPasswordResponse {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) .append(newLine) .append(" username: ") .append(toIndentedString(username)) diff --git a/src/main/java/com/infobip/model/CallsSipTrunkResetPasswordResponse.java b/src/main/java/com/infobip/model/CallsSipTrunkResetPasswordResponse.java new file mode 100644 index 0000000..91c6006 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsSipTrunkResetPasswordResponse.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Represents CallsSipTrunkResetPasswordResponse model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = CallsSipTrunkRegisteredResetPasswordResponse.class, name = "REGISTERED"), +}) +public abstract class CallsSipTrunkResetPasswordResponse { + + protected final CallsSipTrunkType type; + + /** + * Constructs a new {@link CallsSipTrunkResetPasswordResponse} instance. + */ + public CallsSipTrunkResetPasswordResponse(String type) { + this.type = CallsSipTrunkType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public CallsSipTrunkType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsSipTrunkResetPasswordResponse callsSipTrunkResetPasswordResponse = (CallsSipTrunkResetPasswordResponse) o; + return Objects.equals(this.type, callsSipTrunkResetPasswordResponse.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsSipTrunkResetPasswordResponse {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsSipTrunkType.java b/src/main/java/com/infobip/model/CallsSipTrunkType.java index 8b5f113..a8e41b9 100644 --- a/src/main/java/com/infobip/model/CallsSipTrunkType.java +++ b/src/main/java/com/infobip/model/CallsSipTrunkType.java @@ -18,7 +18,8 @@ public enum CallsSipTrunkType { STATIC("STATIC"), REGISTERED("REGISTERED"), - PROVIDER("PROVIDER"); + PROVIDER("PROVIDER"), + AUTHENTICATED("AUTHENTICATED"); private final String value; diff --git a/src/main/java/com/infobip/model/CallsSynthesisVoice.java b/src/main/java/com/infobip/model/CallsSynthesisVoice.java index cfceade..f936ca7 100644 --- a/src/main/java/com/infobip/model/CallsSynthesisVoice.java +++ b/src/main/java/com/infobip/model/CallsSynthesisVoice.java @@ -25,6 +25,10 @@ public class CallsSynthesisVoice { private Boolean ssmlSupported; + private Boolean _default; + + private Boolean neural; + private Boolean isDefault; private Boolean isNeural; @@ -189,6 +193,68 @@ public void setSsmlSupported(Boolean ssmlSupported) { this.ssmlSupported = ssmlSupported; } + /** + * Sets _default. + * + * @param _default + * @return This {@link CallsSynthesisVoice instance}. + */ + public CallsSynthesisVoice _default(Boolean _default) { + this._default = _default; + return this; + } + + /** + * Returns _default. + * + * @return _default + */ + @JsonProperty("default") + public Boolean getDefault() { + return _default; + } + + /** + * Sets _default. + * + * @param _default + */ + @JsonProperty("default") + public void setDefault(Boolean _default) { + this._default = _default; + } + + /** + * Sets neural. + * + * @param neural + * @return This {@link CallsSynthesisVoice instance}. + */ + public CallsSynthesisVoice neural(Boolean neural) { + this.neural = neural; + return this; + } + + /** + * Returns neural. + * + * @return neural + */ + @JsonProperty("neural") + public Boolean getNeural() { + return neural; + } + + /** + * Sets neural. + * + * @param neural + */ + @JsonProperty("neural") + public void setNeural(Boolean neural) { + this.neural = neural; + } + /** * Sets isDefault. *

@@ -282,13 +348,15 @@ public boolean equals(Object o) { && Objects.equals(this.gender, callsSynthesisVoice.gender) && Objects.equals(this.supplier, callsSynthesisVoice.supplier) && Objects.equals(this.ssmlSupported, callsSynthesisVoice.ssmlSupported) + && Objects.equals(this._default, callsSynthesisVoice._default) + && Objects.equals(this.neural, callsSynthesisVoice.neural) && Objects.equals(this.isDefault, callsSynthesisVoice.isDefault) && Objects.equals(this.isNeural, callsSynthesisVoice.isNeural); } @Override public int hashCode() { - return Objects.hash(name, gender, supplier, ssmlSupported, isDefault, isNeural); + return Objects.hash(name, gender, supplier, ssmlSupported, _default, neural, isDefault, isNeural); } @Override @@ -309,6 +377,12 @@ public String toString() { .append(" ssmlSupported: ") .append(toIndentedString(ssmlSupported)) .append(newLine) + .append(" _default: ") + .append(toIndentedString(_default)) + .append(newLine) + .append(" neural: ") + .append(toIndentedString(neural)) + .append(newLine) .append(" isDefault: ") .append(toIndentedString(isDefault)) .append(newLine) diff --git a/src/main/java/com/infobip/model/CallsTtyPlayContent.java b/src/main/java/com/infobip/model/CallsTtyPlayContent.java new file mode 100644 index 0000000..8c288e3 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsTtyPlayContent.java @@ -0,0 +1,116 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents CallsTtyPlayContent model. + */ +public class CallsTtyPlayContent extends CallsPlayContent { + + private String text; + + /** + * Constructs a new {@link CallsTtyPlayContent} instance. + */ + public CallsTtyPlayContent() { + super("TTY"); + } + + /** + * Sets text. + *

+ * Field description: + * Text that will be played in Baudot tones. + *

+ * The field is required. + * + * @param text + * @return This {@link CallsTtyPlayContent instance}. + */ + public CallsTtyPlayContent text(String text) { + this.text = text; + return this; + } + + /** + * Returns text. + *

+ * Field description: + * Text that will be played in Baudot tones. + *

+ * The field is required. + * + * @return text + */ + @JsonProperty("text") + public String getText() { + return text; + } + + /** + * Sets text. + *

+ * Field description: + * Text that will be played in Baudot tones. + *

+ * The field is required. + * + * @param text + */ + @JsonProperty("text") + public void setText(String text) { + this.text = text; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsTtyPlayContent callsTtyPlayContent = (CallsTtyPlayContent) o; + return Objects.equals(this.text, callsTtyPlayContent.text) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(text, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsTtyPlayContent {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" text: ") + .append(toIndentedString(text)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/CallsUrlPlayContent.java b/src/main/java/com/infobip/model/CallsUrlPlayContent.java index 57da210..f09c7cb 100644 --- a/src/main/java/com/infobip/model/CallsUrlPlayContent.java +++ b/src/main/java/com/infobip/model/CallsUrlPlayContent.java @@ -19,8 +19,6 @@ public class CallsUrlPlayContent extends CallsPlayContent { private String fileUrl; - private Integer cacheDuration; - /** * Constructs a new {@link CallsUrlPlayContent} instance. */ @@ -74,37 +72,6 @@ public void setFileUrl(String fileUrl) { this.fileUrl = fileUrl; } - /** - * Sets cacheDuration. - * - * @param cacheDuration - * @return This {@link CallsUrlPlayContent instance}. - */ - public CallsUrlPlayContent cacheDuration(Integer cacheDuration) { - this.cacheDuration = cacheDuration; - return this; - } - - /** - * Returns cacheDuration. - * - * @return cacheDuration - */ - @JsonProperty("cacheDuration") - public Integer getCacheDuration() { - return cacheDuration; - } - - /** - * Sets cacheDuration. - * - * @param cacheDuration - */ - @JsonProperty("cacheDuration") - public void setCacheDuration(Integer cacheDuration) { - this.cacheDuration = cacheDuration; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,14 +81,12 @@ public boolean equals(Object o) { return false; } CallsUrlPlayContent callsUrlPlayContent = (CallsUrlPlayContent) o; - return Objects.equals(this.fileUrl, callsUrlPlayContent.fileUrl) - && Objects.equals(this.cacheDuration, callsUrlPlayContent.cacheDuration) - && super.equals(o); + return Objects.equals(this.fileUrl, callsUrlPlayContent.fileUrl) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(fileUrl, cacheDuration, super.hashCode()); + return Objects.hash(fileUrl, super.hashCode()); } @Override @@ -136,9 +101,6 @@ public String toString() { .append(" fileUrl: ") .append(toIndentedString(fileUrl)) .append(newLine) - .append(" cacheDuration: ") - .append(toIndentedString(cacheDuration)) - .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/CallsValidateAddressResponse.java b/src/main/java/com/infobip/model/CallsValidateAddressResponse.java new file mode 100644 index 0000000..cfc8329 --- /dev/null +++ b/src/main/java/com/infobip/model/CallsValidateAddressResponse.java @@ -0,0 +1,119 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents CallsValidateAddressResponse model. + */ +public class CallsValidateAddressResponse { + + private List validAddresses = null; + + /** + * Sets validAddresses. + *

+ * Field description: + * List of physical valid addresses that matches your input. + * + * @param validAddresses + * @return This {@link CallsValidateAddressResponse instance}. + */ + public CallsValidateAddressResponse validAddresses(List validAddresses) { + this.validAddresses = validAddresses; + return this; + } + + /** + * Adds and item into validAddresses. + *

+ * Field description: + * List of physical valid addresses that matches your input. + * + * @param validAddressesItem The item to be added to the list. + * @return This {@link CallsValidateAddressResponse instance}. + */ + public CallsValidateAddressResponse addValidAddressesItem(CallsAddress validAddressesItem) { + if (this.validAddresses == null) { + this.validAddresses = new ArrayList<>(); + } + this.validAddresses.add(validAddressesItem); + return this; + } + + /** + * Returns validAddresses. + *

+ * Field description: + * List of physical valid addresses that matches your input. + * + * @return validAddresses + */ + @JsonProperty("validAddresses") + public List getValidAddresses() { + return validAddresses; + } + + /** + * Sets validAddresses. + *

+ * Field description: + * List of physical valid addresses that matches your input. + * + * @param validAddresses + */ + @JsonProperty("validAddresses") + public void setValidAddresses(List validAddresses) { + this.validAddresses = validAddresses; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallsValidateAddressResponse callsValidateAddressResponse = (CallsValidateAddressResponse) o; + return Objects.equals(this.validAddresses, callsValidateAddressResponse.validAddresses); + } + + @Override + public int hashCode() { + return Objects.hash(validAddresses); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class CallsValidateAddressResponse {") + .append(newLine) + .append(" validAddresses: ") + .append(toIndentedString(validAddresses)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/GetResourceRequest200Response.java b/src/main/java/com/infobip/model/GetResourceRequest200Response.java new file mode 100644 index 0000000..2af9367 --- /dev/null +++ b/src/main/java/com/infobip/model/GetResourceRequest200Response.java @@ -0,0 +1,21 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaResourceOrderApiDoc.class), + @JsonSubTypes.Type(value = ResourcesNumberResourceOrderApiDoc.class), + @JsonSubTypes.Type(value = ResourcesRcsSenderResourceOrderApiDoc.class) +}) +public interface GetResourceRequest200Response {} diff --git a/src/main/java/com/infobip/model/MessagesApiInboundDlrChannel.java b/src/main/java/com/infobip/model/MessagesApiInboundDlrChannel.java index 7a650e5..2586219 100644 --- a/src/main/java/com/infobip/model/MessagesApiInboundDlrChannel.java +++ b/src/main/java/com/infobip/model/MessagesApiInboundDlrChannel.java @@ -13,7 +13,7 @@ import com.fasterxml.jackson.annotation.JsonValue; /** - * Messaging channel used for sending an event. + * Messaging channel used for sending an event. `KAKAO, ZALO, VOICE or TELEGRAM` can be received with Smart Messaging. */ public enum MessagesApiInboundDlrChannel { APPLE_MB("APPLE_MB"), @@ -25,7 +25,11 @@ public enum MessagesApiInboundDlrChannel { SMS("SMS"), VIBER_BM("VIBER_BM"), VIBER_BOT("VIBER_BOT"), - WHATSAPP("WHATSAPP"); + WHATSAPP("WHATSAPP"), + KAKAO("KAKAO"), + ZALO("ZALO"), + VOICE("VOICE"), + TELEGRAM("TELEGRAM"); private final String value; diff --git a/src/main/java/com/infobip/model/MessagesApiInboundTypingStartedChannel.java b/src/main/java/com/infobip/model/MessagesApiInboundTypingStartedChannel.java new file mode 100644 index 0000000..0cb6fef --- /dev/null +++ b/src/main/java/com/infobip/model/MessagesApiInboundTypingStartedChannel.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Messaging channel used for sending a message. + */ +public enum MessagesApiInboundTypingStartedChannel { + APPLE_MB("APPLE_MB"), + RCS("RCS"); + + private final String value; + + MessagesApiInboundTypingStartedChannel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MessagesApiInboundTypingStartedChannel fromValue(String value) { + for (MessagesApiInboundTypingStartedChannel enumElement : MessagesApiInboundTypingStartedChannel.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/MessagesApiInboundTypingStartedEvent.java b/src/main/java/com/infobip/model/MessagesApiInboundTypingStartedEvent.java index 5247eee..7b44d8a 100644 --- a/src/main/java/com/infobip/model/MessagesApiInboundTypingStartedEvent.java +++ b/src/main/java/com/infobip/model/MessagesApiInboundTypingStartedEvent.java @@ -18,7 +18,7 @@ */ public class MessagesApiInboundTypingStartedEvent extends MessagesApiInboundEvent { - private MessagesApiInboundTypingIndicatorChannel channel; + private MessagesApiInboundTypingStartedChannel channel; private String sender; @@ -49,7 +49,7 @@ public MessagesApiInboundTypingStartedEvent() { * @param channel * @return This {@link MessagesApiInboundTypingStartedEvent instance}. */ - public MessagesApiInboundTypingStartedEvent channel(MessagesApiInboundTypingIndicatorChannel channel) { + public MessagesApiInboundTypingStartedEvent channel(MessagesApiInboundTypingStartedChannel channel) { this.channel = channel; return this; } @@ -62,7 +62,7 @@ public MessagesApiInboundTypingStartedEvent channel(MessagesApiInboundTypingIndi * @return channel */ @JsonProperty("channel") - public MessagesApiInboundTypingIndicatorChannel getChannel() { + public MessagesApiInboundTypingStartedChannel getChannel() { return channel; } @@ -74,7 +74,7 @@ public MessagesApiInboundTypingIndicatorChannel getChannel() { * @param channel */ @JsonProperty("channel") - public void setChannel(MessagesApiInboundTypingIndicatorChannel channel) { + public void setChannel(MessagesApiInboundTypingStartedChannel channel) { this.channel = channel; } diff --git a/src/main/java/com/infobip/model/MessagesApiInboundTypingIndicatorChannel.java b/src/main/java/com/infobip/model/MessagesApiInboundTypingStoppedChannel.java similarity index 76% rename from src/main/java/com/infobip/model/MessagesApiInboundTypingIndicatorChannel.java rename to src/main/java/com/infobip/model/MessagesApiInboundTypingStoppedChannel.java index 5466c0b..cbe2c02 100644 --- a/src/main/java/com/infobip/model/MessagesApiInboundTypingIndicatorChannel.java +++ b/src/main/java/com/infobip/model/MessagesApiInboundTypingStoppedChannel.java @@ -15,12 +15,12 @@ /** * Messaging channel used for sending a message. */ -public enum MessagesApiInboundTypingIndicatorChannel { +public enum MessagesApiInboundTypingStoppedChannel { APPLE_MB("APPLE_MB"); private final String value; - MessagesApiInboundTypingIndicatorChannel(String value) { + MessagesApiInboundTypingStoppedChannel(String value) { this.value = value; } @@ -35,8 +35,8 @@ public String toString() { } @JsonCreator - public static MessagesApiInboundTypingIndicatorChannel fromValue(String value) { - for (MessagesApiInboundTypingIndicatorChannel enumElement : MessagesApiInboundTypingIndicatorChannel.values()) { + public static MessagesApiInboundTypingStoppedChannel fromValue(String value) { + for (MessagesApiInboundTypingStoppedChannel enumElement : MessagesApiInboundTypingStoppedChannel.values()) { if (enumElement.value.equals(value)) { return enumElement; } diff --git a/src/main/java/com/infobip/model/MessagesApiInboundTypingStoppedEvent.java b/src/main/java/com/infobip/model/MessagesApiInboundTypingStoppedEvent.java index 0624d5c..ad50a0b 100644 --- a/src/main/java/com/infobip/model/MessagesApiInboundTypingStoppedEvent.java +++ b/src/main/java/com/infobip/model/MessagesApiInboundTypingStoppedEvent.java @@ -18,7 +18,7 @@ */ public class MessagesApiInboundTypingStoppedEvent extends MessagesApiInboundEvent { - private MessagesApiInboundTypingIndicatorChannel channel; + private MessagesApiInboundTypingStoppedChannel channel; private String sender; @@ -49,7 +49,7 @@ public MessagesApiInboundTypingStoppedEvent() { * @param channel * @return This {@link MessagesApiInboundTypingStoppedEvent instance}. */ - public MessagesApiInboundTypingStoppedEvent channel(MessagesApiInboundTypingIndicatorChannel channel) { + public MessagesApiInboundTypingStoppedEvent channel(MessagesApiInboundTypingStoppedChannel channel) { this.channel = channel; return this; } @@ -62,7 +62,7 @@ public MessagesApiInboundTypingStoppedEvent channel(MessagesApiInboundTypingIndi * @return channel */ @JsonProperty("channel") - public MessagesApiInboundTypingIndicatorChannel getChannel() { + public MessagesApiInboundTypingStoppedChannel getChannel() { return channel; } @@ -74,7 +74,7 @@ public MessagesApiInboundTypingIndicatorChannel getChannel() { * @param channel */ @JsonProperty("channel") - public void setChannel(MessagesApiInboundTypingIndicatorChannel channel) { + public void setChannel(MessagesApiInboundTypingStoppedChannel channel) { this.channel = channel; } diff --git a/src/main/java/com/infobip/model/MessagesApiOutboundEvent.java b/src/main/java/com/infobip/model/MessagesApiOutboundEvent.java index c5cf4f4..7a8e348 100644 --- a/src/main/java/com/infobip/model/MessagesApiOutboundEvent.java +++ b/src/main/java/com/infobip/model/MessagesApiOutboundEvent.java @@ -23,6 +23,7 @@ property = "event", visible = true) @JsonSubTypes({ + @JsonSubTypes.Type(value = MessagesApiOutboundSeenEvent.class, name = "SEEN"), @JsonSubTypes.Type(value = MessagesApiOutboundTypingStartedEvent.class, name = "TYPING_STARTED"), @JsonSubTypes.Type(value = MessagesApiOutboundTypingStoppedEvent.class, name = "TYPING_STOPPED"), }) diff --git a/src/main/java/com/infobip/model/MessagesApiOutboundEventType.java b/src/main/java/com/infobip/model/MessagesApiOutboundEventType.java index 0722125..db588b1 100644 --- a/src/main/java/com/infobip/model/MessagesApiOutboundEventType.java +++ b/src/main/java/com/infobip/model/MessagesApiOutboundEventType.java @@ -17,7 +17,8 @@ */ public enum MessagesApiOutboundEventType { STARTED("TYPING_STARTED"), - STOPPED("TYPING_STOPPED"); + STOPPED("TYPING_STOPPED"), + SEEN("SEEN"); private final String value; diff --git a/src/main/java/com/infobip/model/MessagesApiOutboundSeenEvent.java b/src/main/java/com/infobip/model/MessagesApiOutboundSeenEvent.java new file mode 100644 index 0000000..39665fd --- /dev/null +++ b/src/main/java/com/infobip/model/MessagesApiOutboundSeenEvent.java @@ -0,0 +1,322 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents MessagesApiOutboundSeenEvent model. + */ +public class MessagesApiOutboundSeenEvent extends MessagesApiOutboundEvent { + + private MessagesApiOutboundSeenEventChannel channel; + + private String sender; + + private List destinations = new ArrayList<>(); + + private String messageId; + + private MessagesApiEventOptions options; + + /** + * Constructs a new {@link MessagesApiOutboundSeenEvent} instance. + */ + public MessagesApiOutboundSeenEvent() { + super("SEEN"); + } + + /** + * Sets channel. + *

+ * The field is required. + * + * @param channel + * @return This {@link MessagesApiOutboundSeenEvent instance}. + */ + public MessagesApiOutboundSeenEvent channel(MessagesApiOutboundSeenEventChannel channel) { + this.channel = channel; + return this; + } + + /** + * Returns channel. + *

+ * The field is required. + * + * @return channel + */ + @JsonProperty("channel") + public MessagesApiOutboundSeenEventChannel getChannel() { + return channel; + } + + /** + * Sets channel. + *

+ * The field is required. + * + * @param channel + */ + @JsonProperty("channel") + public void setChannel(MessagesApiOutboundSeenEventChannel channel) { + this.channel = channel; + } + + /** + * Sets sender. + *

+ * Field description: + * The sender ID. It can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names). + *

+ * The field is required. + * + * @param sender + * @return This {@link MessagesApiOutboundSeenEvent instance}. + */ + public MessagesApiOutboundSeenEvent sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Returns sender. + *

+ * Field description: + * The sender ID. It can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names). + *

+ * The field is required. + * + * @return sender + */ + @JsonProperty("sender") + public String getSender() { + return sender; + } + + /** + * Sets sender. + *

+ * Field description: + * The sender ID. It can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names). + *

+ * The field is required. + * + * @param sender + */ + @JsonProperty("sender") + public void setSender(String sender) { + this.sender = sender; + } + + /** + * Sets destinations. + *

+ * Field description: + * Array of destination objects for where events are being sent. A valid destination is required. + *

+ * The field is required. + * + * @param destinations + * @return This {@link MessagesApiOutboundSeenEvent instance}. + */ + public MessagesApiOutboundSeenEvent destinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Adds and item into destinations. + *

+ * Field description: + * Array of destination objects for where events are being sent. A valid destination is required. + *

+ * The field is required. + * + * @param destinationsItem The item to be added to the list. + * @return This {@link MessagesApiOutboundSeenEvent instance}. + */ + public MessagesApiOutboundSeenEvent addDestinationsItem(MessagesApiToDestination destinationsItem) { + if (this.destinations == null) { + this.destinations = new ArrayList<>(); + } + this.destinations.add(destinationsItem); + return this; + } + + /** + * Returns destinations. + *

+ * Field description: + * Array of destination objects for where events are being sent. A valid destination is required. + *

+ * The field is required. + * + * @return destinations + */ + @JsonProperty("destinations") + public List getDestinations() { + return destinations; + } + + /** + * Sets destinations. + *

+ * Field description: + * Array of destination objects for where events are being sent. A valid destination is required. + *

+ * The field is required. + * + * @param destinations + */ + @JsonProperty("destinations") + public void setDestinations(List destinations) { + this.destinations = destinations; + } + + /** + * Sets messageId. + *

+ * Field description: + * ID of the message that should be marked as seen. + *

+ * The field is required. + * + * @param messageId + * @return This {@link MessagesApiOutboundSeenEvent instance}. + */ + public MessagesApiOutboundSeenEvent messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Returns messageId. + *

+ * Field description: + * ID of the message that should be marked as seen. + *

+ * The field is required. + * + * @return messageId + */ + @JsonProperty("messageId") + public String getMessageId() { + return messageId; + } + + /** + * Sets messageId. + *

+ * Field description: + * ID of the message that should be marked as seen. + *

+ * The field is required. + * + * @param messageId + */ + @JsonProperty("messageId") + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + /** + * Sets options. + * + * @param options + * @return This {@link MessagesApiOutboundSeenEvent instance}. + */ + public MessagesApiOutboundSeenEvent options(MessagesApiEventOptions options) { + this.options = options; + return this; + } + + /** + * Returns options. + * + * @return options + */ + @JsonProperty("options") + public MessagesApiEventOptions getOptions() { + return options; + } + + /** + * Sets options. + * + * @param options + */ + @JsonProperty("options") + public void setOptions(MessagesApiEventOptions options) { + this.options = options; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MessagesApiOutboundSeenEvent messagesApiOutboundSeenEvent = (MessagesApiOutboundSeenEvent) o; + return Objects.equals(this.channel, messagesApiOutboundSeenEvent.channel) + && Objects.equals(this.sender, messagesApiOutboundSeenEvent.sender) + && Objects.equals(this.destinations, messagesApiOutboundSeenEvent.destinations) + && Objects.equals(this.messageId, messagesApiOutboundSeenEvent.messageId) + && Objects.equals(this.options, messagesApiOutboundSeenEvent.options) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(channel, sender, destinations, messageId, options, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class MessagesApiOutboundSeenEvent {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" channel: ") + .append(toIndentedString(channel)) + .append(newLine) + .append(" sender: ") + .append(toIndentedString(sender)) + .append(newLine) + .append(" destinations: ") + .append(toIndentedString(destinations)) + .append(newLine) + .append(" messageId: ") + .append(toIndentedString(messageId)) + .append(newLine) + .append(" options: ") + .append(toIndentedString(options)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/MessagesApiOutboundEventChannel.java b/src/main/java/com/infobip/model/MessagesApiOutboundSeenEventChannel.java similarity index 76% rename from src/main/java/com/infobip/model/MessagesApiOutboundEventChannel.java rename to src/main/java/com/infobip/model/MessagesApiOutboundSeenEventChannel.java index ae62109..bb1039d 100644 --- a/src/main/java/com/infobip/model/MessagesApiOutboundEventChannel.java +++ b/src/main/java/com/infobip/model/MessagesApiOutboundSeenEventChannel.java @@ -15,12 +15,12 @@ /** * Messaging channel used for sending an event. */ -public enum MessagesApiOutboundEventChannel { - APPLE_MB("APPLE_MB"); +public enum MessagesApiOutboundSeenEventChannel { + RCS("RCS"); private final String value; - MessagesApiOutboundEventChannel(String value) { + MessagesApiOutboundSeenEventChannel(String value) { this.value = value; } @@ -35,8 +35,8 @@ public String toString() { } @JsonCreator - public static MessagesApiOutboundEventChannel fromValue(String value) { - for (MessagesApiOutboundEventChannel enumElement : MessagesApiOutboundEventChannel.values()) { + public static MessagesApiOutboundSeenEventChannel fromValue(String value) { + for (MessagesApiOutboundSeenEventChannel enumElement : MessagesApiOutboundSeenEventChannel.values()) { if (enumElement.value.equals(value)) { return enumElement; } diff --git a/src/main/java/com/infobip/model/MessagesApiOutboundTypingStartedEvent.java b/src/main/java/com/infobip/model/MessagesApiOutboundTypingStartedEvent.java index 273de93..57b749d 100644 --- a/src/main/java/com/infobip/model/MessagesApiOutboundTypingStartedEvent.java +++ b/src/main/java/com/infobip/model/MessagesApiOutboundTypingStartedEvent.java @@ -19,7 +19,7 @@ */ public class MessagesApiOutboundTypingStartedEvent extends MessagesApiOutboundEvent { - private MessagesApiOutboundEventChannel channel; + private MessagesApiOutboundTypingStartedEventChannel channel; private String sender; @@ -42,7 +42,7 @@ public MessagesApiOutboundTypingStartedEvent() { * @param channel * @return This {@link MessagesApiOutboundTypingStartedEvent instance}. */ - public MessagesApiOutboundTypingStartedEvent channel(MessagesApiOutboundEventChannel channel) { + public MessagesApiOutboundTypingStartedEvent channel(MessagesApiOutboundTypingStartedEventChannel channel) { this.channel = channel; return this; } @@ -55,7 +55,7 @@ public MessagesApiOutboundTypingStartedEvent channel(MessagesApiOutboundEventCha * @return channel */ @JsonProperty("channel") - public MessagesApiOutboundEventChannel getChannel() { + public MessagesApiOutboundTypingStartedEventChannel getChannel() { return channel; } @@ -67,7 +67,7 @@ public MessagesApiOutboundEventChannel getChannel() { * @param channel */ @JsonProperty("channel") - public void setChannel(MessagesApiOutboundEventChannel channel) { + public void setChannel(MessagesApiOutboundTypingStartedEventChannel channel) { this.channel = channel; } diff --git a/src/main/java/com/infobip/model/MessagesApiOutboundTypingStartedEventChannel.java b/src/main/java/com/infobip/model/MessagesApiOutboundTypingStartedEventChannel.java new file mode 100644 index 0000000..eb2031b --- /dev/null +++ b/src/main/java/com/infobip/model/MessagesApiOutboundTypingStartedEventChannel.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Messaging channel used for sending an event. + */ +public enum MessagesApiOutboundTypingStartedEventChannel { + APPLE_MB("APPLE_MB"), + RCS("RCS"), + WHATSAPP("WHATSAPP"); + + private final String value; + + MessagesApiOutboundTypingStartedEventChannel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MessagesApiOutboundTypingStartedEventChannel fromValue(String value) { + for (MessagesApiOutboundTypingStartedEventChannel enumElement : + MessagesApiOutboundTypingStartedEventChannel.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/MessagesApiOutboundTypingStoppedEvent.java b/src/main/java/com/infobip/model/MessagesApiOutboundTypingStoppedEvent.java index 0291820..41af411 100644 --- a/src/main/java/com/infobip/model/MessagesApiOutboundTypingStoppedEvent.java +++ b/src/main/java/com/infobip/model/MessagesApiOutboundTypingStoppedEvent.java @@ -19,7 +19,7 @@ */ public class MessagesApiOutboundTypingStoppedEvent extends MessagesApiOutboundEvent { - private MessagesApiOutboundEventChannel channel; + private MessagesApiOutboundTypingStoppedEventChannel channel; private String sender; @@ -42,7 +42,7 @@ public MessagesApiOutboundTypingStoppedEvent() { * @param channel * @return This {@link MessagesApiOutboundTypingStoppedEvent instance}. */ - public MessagesApiOutboundTypingStoppedEvent channel(MessagesApiOutboundEventChannel channel) { + public MessagesApiOutboundTypingStoppedEvent channel(MessagesApiOutboundTypingStoppedEventChannel channel) { this.channel = channel; return this; } @@ -55,7 +55,7 @@ public MessagesApiOutboundTypingStoppedEvent channel(MessagesApiOutboundEventCha * @return channel */ @JsonProperty("channel") - public MessagesApiOutboundEventChannel getChannel() { + public MessagesApiOutboundTypingStoppedEventChannel getChannel() { return channel; } @@ -67,7 +67,7 @@ public MessagesApiOutboundEventChannel getChannel() { * @param channel */ @JsonProperty("channel") - public void setChannel(MessagesApiOutboundEventChannel channel) { + public void setChannel(MessagesApiOutboundTypingStoppedEventChannel channel) { this.channel = channel; } diff --git a/src/main/java/com/infobip/model/MessagesApiOutboundTypingStoppedEventChannel.java b/src/main/java/com/infobip/model/MessagesApiOutboundTypingStoppedEventChannel.java new file mode 100644 index 0000000..26e541b --- /dev/null +++ b/src/main/java/com/infobip/model/MessagesApiOutboundTypingStoppedEventChannel.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Messaging channel used for sending an event. + */ +public enum MessagesApiOutboundTypingStoppedEventChannel { + APPLE_MB("APPLE_MB"); + + private final String value; + + MessagesApiOutboundTypingStoppedEventChannel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MessagesApiOutboundTypingStoppedEventChannel fromValue(String value) { + for (MessagesApiOutboundTypingStoppedEventChannel enumElement : + MessagesApiOutboundTypingStoppedEventChannel.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/MoActionType.java b/src/main/java/com/infobip/model/MoActionType.java new file mode 100644 index 0000000..d7a2307 --- /dev/null +++ b/src/main/java/com/infobip/model/MoActionType.java @@ -0,0 +1,77 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines voice action for inbound calls. + */ +public enum MoActionType { + PULL("PULL"), + HTTP_FORWARD("HTTP_FORWARD"), + SMPP_FORWARD("SMPP_FORWARD"), + MAIL_FORWARD("MAIL_FORWARD"), + NO_ACTION("NO_ACTION"), + BLOCK("BLOCK"), + AUTORESPONSE("AUTORESPONSE"), + USSD("USSD"), + SEND_BULK_MT("SEND_BULK_MT"), + EMAIL_TO_SMS_FORWARD("EMAIL_TO_SMS_FORWARD"), + CNS_FWD("CNS_FWD"), + USE_CONVERSATIONS("USE_CONVERSATIONS"), + FORWARD_TO_PSTN("FORWARD_TO_PSTN"), + FORWARD_TO_IP("FORWARD_TO_IP"), + FORWARD_TO_IVR("FORWARD_TO_IVR"), + VOICE_NUMBER_MASKING("VOICE_NUMBER_MASKING"), + VOICE_CALL_DROP("VOICE_CALL_DROP"), + FORWARD_TO_WEBRTC("FORWARD_TO_WEBRTC"), + VOICE_FORWARD_TO_CONVERSATIONS("VOICE_FORWARD_TO_CONVERSATIONS"), + VOICE_FORWARD_TO_CONVERSATIONS_WITH_FLOW("VOICE_FORWARD_TO_CONVERSATIONS_WITH_FLOW"), + CALL_FORWARD_TO_APPLICATION("CALL_FORWARD_TO_APPLICATION"), + FORWARD_TO_SUBSCRIPTION("FORWARD_TO_SUBSCRIPTION"), + FORWARD_TO_CALL_ROUTING("FORWARD_TO_CALL_ROUTING"), + USE_ANSWERS("USE_ANSWERS"), + VOICE_FORWARD_TO_ANSWERS("VOICE_FORWARD_TO_ANSWERS"), + VOICE_FORWARD_TO_FLOW("VOICE_FORWARD_TO_FLOW"), + VOICE_FORWARD_TO_FLOW_WITH_CONVERSATIONS("VOICE_FORWARD_TO_FLOW_WITH_CONVERSATIONS"), + FORWARD_TO_OPERATOR_CONNECT("FORWARD_TO_OPERATOR_CONNECT"), + FORWARD_TO_EXTERNAL_INTEGRATION("FORWARD_TO_EXTERNAL_INTEGRATION"), + FORWARD_TO_AI_AGENT("FORWARD_TO_AI_AGENT"), + FORWARD_TO_MARKUP_LANGUAGE("FORWARD_TO_MARKUP_LANGUAGE"), + OTHER("OTHER"); + + private final String value; + + MoActionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MoActionType fromValue(String value) { + for (MoActionType enumElement : MoActionType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumberType.java b/src/main/java/com/infobip/model/NumberType.java new file mode 100644 index 0000000..ee50628 --- /dev/null +++ b/src/main/java/com/infobip/model/NumberType.java @@ -0,0 +1,59 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of number. + */ +public enum NumberType { + VIRTUAL_LONG_NUMBER("VIRTUAL_LONG_NUMBER"), + SHORT_CODE("SHORT_CODE"), + SIM_HOSTING("SIM_HOSTING"), + VIRTUAL_SIM_HOSTING("VIRTUAL_SIM_HOSTING"), + VIRTUAL_LONG_NUMBER_CALL_TRIGGER("VIRTUAL_LONG_NUMBER_CALL_TRIGGER"), + SHORT_CODE_USSD("SHORT_CODE_USSD"), + WHATSAPP("WHATSAPP"), + VIBER("VIBER"), + VIBER_VOICE("VIBER_VOICE"), + FACEBOOK("FACEBOOK"), + RCS("RCS"), + TELEGRAM("TELEGRAM"), + KAKAO_SANGDAM("KAKAO_SANGDAM"), + OPEN_CHANNEL("OPEN_CHANNEL"); + + private final String value; + + NumberType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumberType fromValue(String value) { + for (NumberType enumElement : NumberType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersAddress.java b/src/main/java/com/infobip/model/NumbersAddress.java new file mode 100644 index 0000000..a6623b9 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersAddress.java @@ -0,0 +1,256 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The address of the brand. + */ +public class NumbersAddress { + + private String city; + + private String state; + + private String street; + + private String zipCode; + + /** + * Sets city. + *

+ * Field description: + * The city in which the brand is located. + *

+ * The field is required. + * + * @param city + * @return This {@link NumbersAddress instance}. + */ + public NumbersAddress city(String city) { + this.city = city; + return this; + } + + /** + * Returns city. + *

+ * Field description: + * The city in which the brand is located. + *

+ * The field is required. + * + * @return city + */ + @JsonProperty("city") + public String getCity() { + return city; + } + + /** + * Sets city. + *

+ * Field description: + * The city in which the brand is located. + *

+ * The field is required. + * + * @param city + */ + @JsonProperty("city") + public void setCity(String city) { + this.city = city; + } + + /** + * Sets state. + *

+ * Field description: + * State or province. For the United States, please use 2 character codes. E.g. 'CA' for California. + * + * @param state + * @return This {@link NumbersAddress instance}. + */ + public NumbersAddress state(String state) { + this.state = state; + return this; + } + + /** + * Returns state. + *

+ * Field description: + * State or province. For the United States, please use 2 character codes. E.g. 'CA' for California. + * + * @return state + */ + @JsonProperty("state") + public String getState() { + return state; + } + + /** + * Sets state. + *

+ * Field description: + * State or province. For the United States, please use 2 character codes. E.g. 'CA' for California. + * + * @param state + */ + @JsonProperty("state") + public void setState(String state) { + this.state = state; + } + + /** + * Sets street. + *

+ * Field description: + * The street address for the brand. + *

+ * The field is required. + * + * @param street + * @return This {@link NumbersAddress instance}. + */ + public NumbersAddress street(String street) { + this.street = street; + return this; + } + + /** + * Returns street. + *

+ * Field description: + * The street address for the brand. + *

+ * The field is required. + * + * @return street + */ + @JsonProperty("street") + public String getStreet() { + return street; + } + + /** + * Sets street. + *

+ * Field description: + * The street address for the brand. + *

+ * The field is required. + * + * @param street + */ + @JsonProperty("street") + public void setStreet(String street) { + this.street = street; + } + + /** + * Sets zipCode. + *

+ * Field description: + * The zipcode in which the brand is located. + *

+ * The field is required. + * + * @param zipCode + * @return This {@link NumbersAddress instance}. + */ + public NumbersAddress zipCode(String zipCode) { + this.zipCode = zipCode; + return this; + } + + /** + * Returns zipCode. + *

+ * Field description: + * The zipcode in which the brand is located. + *

+ * The field is required. + * + * @return zipCode + */ + @JsonProperty("zipCode") + public String getZipCode() { + return zipCode; + } + + /** + * Sets zipCode. + *

+ * Field description: + * The zipcode in which the brand is located. + *

+ * The field is required. + * + * @param zipCode + */ + @JsonProperty("zipCode") + public void setZipCode(String zipCode) { + this.zipCode = zipCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersAddress numbersAddress = (NumbersAddress) o; + return Objects.equals(this.city, numbersAddress.city) + && Objects.equals(this.state, numbersAddress.state) + && Objects.equals(this.street, numbersAddress.street) + && Objects.equals(this.zipCode, numbersAddress.zipCode); + } + + @Override + public int hashCode() { + return Objects.hash(city, state, street, zipCode); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersAddress {") + .append(newLine) + .append(" city: ") + .append(toIndentedString(city)) + .append(newLine) + .append(" state: ") + .append(toIndentedString(state)) + .append(newLine) + .append(" street: ") + .append(toIndentedString(street)) + .append(newLine) + .append(" zipCode: ") + .append(toIndentedString(zipCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersAegisVetImportRequest.java b/src/main/java/com/infobip/model/NumbersAegisVetImportRequest.java new file mode 100644 index 0000000..6381daa --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersAegisVetImportRequest.java @@ -0,0 +1,169 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersAegisVetImportRequest model. + */ +public class NumbersAegisVetImportRequest extends NumbersVetImportRequest { + + private String externalVetId; + + private String vettingToken; + + /** + * Constructs a new {@link NumbersAegisVetImportRequest} instance. + */ + public NumbersAegisVetImportRequest() { + super("AEGIS_MOBILE"); + } + + /** + * Sets externalVetId. + *

+ * Field description: + * Aegis external vetting ID + *

+ * The field is required. + * + * @param externalVetId + * @return This {@link NumbersAegisVetImportRequest instance}. + */ + public NumbersAegisVetImportRequest externalVetId(String externalVetId) { + this.externalVetId = externalVetId; + return this; + } + + /** + * Returns externalVetId. + *

+ * Field description: + * Aegis external vetting ID + *

+ * The field is required. + * + * @return externalVetId + */ + @JsonProperty("externalVetId") + public String getExternalVetId() { + return externalVetId; + } + + /** + * Sets externalVetId. + *

+ * Field description: + * Aegis external vetting ID + *

+ * The field is required. + * + * @param externalVetId + */ + @JsonProperty("externalVetId") + public void setExternalVetId(String externalVetId) { + this.externalVetId = externalVetId; + } + + /** + * Sets vettingToken. + *

+ * Field description: + * Aegis vetting token + *

+ * The field is required. + * + * @param vettingToken + * @return This {@link NumbersAegisVetImportRequest instance}. + */ + public NumbersAegisVetImportRequest vettingToken(String vettingToken) { + this.vettingToken = vettingToken; + return this; + } + + /** + * Returns vettingToken. + *

+ * Field description: + * Aegis vetting token + *

+ * The field is required. + * + * @return vettingToken + */ + @JsonProperty("vettingToken") + public String getVettingToken() { + return vettingToken; + } + + /** + * Sets vettingToken. + *

+ * Field description: + * Aegis vetting token + *

+ * The field is required. + * + * @param vettingToken + */ + @JsonProperty("vettingToken") + public void setVettingToken(String vettingToken) { + this.vettingToken = vettingToken; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersAegisVetImportRequest numbersAegisVetImportRequest = (NumbersAegisVetImportRequest) o; + return Objects.equals(this.externalVetId, numbersAegisVetImportRequest.externalVetId) + && Objects.equals(this.vettingToken, numbersAegisVetImportRequest.vettingToken) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(externalVetId, vettingToken, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersAegisVetImportRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" externalVetId: ") + .append(toIndentedString(externalVetId)) + .append(newLine) + .append(" vettingToken: ") + .append(toIndentedString(vettingToken)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersAppealData.java b/src/main/java/com/infobip/model/NumbersAppealData.java new file mode 100644 index 0000000..7b05bb4 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersAppealData.java @@ -0,0 +1,147 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Represents NumbersAppealData model. + */ +public class NumbersAppealData { + + private String appealReason; + + private OffsetDateTime appealDate; + + /** + * Sets appealReason. + *

+ * Field description: + * The reason for the appeal. + * + * @param appealReason + * @return This {@link NumbersAppealData instance}. + */ + public NumbersAppealData appealReason(String appealReason) { + this.appealReason = appealReason; + return this; + } + + /** + * Returns appealReason. + *

+ * Field description: + * The reason for the appeal. + * + * @return appealReason + */ + @JsonProperty("appealReason") + public String getAppealReason() { + return appealReason; + } + + /** + * Sets appealReason. + *

+ * Field description: + * The reason for the appeal. + * + * @param appealReason + */ + @JsonProperty("appealReason") + public void setAppealReason(String appealReason) { + this.appealReason = appealReason; + } + + /** + * Sets appealDate. + *

+ * Field description: + * The time of the appeal. + * + * @param appealDate + * @return This {@link NumbersAppealData instance}. + */ + public NumbersAppealData appealDate(OffsetDateTime appealDate) { + this.appealDate = appealDate; + return this; + } + + /** + * Returns appealDate. + *

+ * Field description: + * The time of the appeal. + * + * @return appealDate + */ + @JsonProperty("appealDate") + public OffsetDateTime getAppealDate() { + return appealDate; + } + + /** + * Sets appealDate. + *

+ * Field description: + * The time of the appeal. + * + * @param appealDate + */ + @JsonProperty("appealDate") + public void setAppealDate(OffsetDateTime appealDate) { + this.appealDate = appealDate; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersAppealData numbersAppealData = (NumbersAppealData) o; + return Objects.equals(this.appealReason, numbersAppealData.appealReason) + && Objects.equals(this.appealDate, numbersAppealData.appealDate); + } + + @Override + public int hashCode() { + return Objects.hash(appealReason, appealDate); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersAppealData {") + .append(newLine) + .append(" appealReason: ") + .append(toIndentedString(appealReason)) + .append(newLine) + .append(" appealDate: ") + .append(toIndentedString(appealDate)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersAppealRequest.java b/src/main/java/com/infobip/model/NumbersAppealRequest.java new file mode 100644 index 0000000..7927eec --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersAppealRequest.java @@ -0,0 +1,106 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersAppealRequest model. + */ +public class NumbersAppealRequest { + + private String reason; + + /** + * Sets reason. + *

+ * Field description: + * The reason for the appeal. + *

+ * The field is required. + * + * @param reason + * @return This {@link NumbersAppealRequest instance}. + */ + public NumbersAppealRequest reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Returns reason. + *

+ * Field description: + * The reason for the appeal. + *

+ * The field is required. + * + * @return reason + */ + @JsonProperty("reason") + public String getReason() { + return reason; + } + + /** + * Sets reason. + *

+ * Field description: + * The reason for the appeal. + *

+ * The field is required. + * + * @param reason + */ + @JsonProperty("reason") + public void setReason(String reason) { + this.reason = reason; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersAppealRequest numbersAppealRequest = (NumbersAppealRequest) o; + return Objects.equals(this.reason, numbersAppealRequest.reason); + } + + @Override + public int hashCode() { + return Objects.hash(reason); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersAppealRequest {") + .append(newLine) + .append(" reason: ") + .append(toIndentedString(reason)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersAttachNumberPoolRequest.java b/src/main/java/com/infobip/model/NumbersAttachNumberPoolRequest.java new file mode 100644 index 0000000..52aa893 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersAttachNumberPoolRequest.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersAttachNumberPoolRequest model. + */ +public class NumbersAttachNumberPoolRequest { + + private String numberPoolId; + + private String reason; + + /** + * Sets numberPoolId. + *

+ * Field description: + * Unique identifier of the number pool to be used for this campaign. If not provided, a default number pool will be automatically assigned. + * + * @param numberPoolId + * @return This {@link NumbersAttachNumberPoolRequest instance}. + */ + public NumbersAttachNumberPoolRequest numberPoolId(String numberPoolId) { + this.numberPoolId = numberPoolId; + return this; + } + + /** + * Returns numberPoolId. + *

+ * Field description: + * Unique identifier of the number pool to be used for this campaign. If not provided, a default number pool will be automatically assigned. + * + * @return numberPoolId + */ + @JsonProperty("numberPoolId") + public String getNumberPoolId() { + return numberPoolId; + } + + /** + * Sets numberPoolId. + *

+ * Field description: + * Unique identifier of the number pool to be used for this campaign. If not provided, a default number pool will be automatically assigned. + * + * @param numberPoolId + */ + @JsonProperty("numberPoolId") + public void setNumberPoolId(String numberPoolId) { + this.numberPoolId = numberPoolId; + } + + /** + * Sets reason. + *

+ * Field description: + * A concise explanation of why this campaign requires a dedicated number pool. Include operational or regulatory justifications, such as high-volume messaging, the use of multiple sender identities, or throughput guarantees. + * + * @param reason + * @return This {@link NumbersAttachNumberPoolRequest instance}. + */ + public NumbersAttachNumberPoolRequest reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Returns reason. + *

+ * Field description: + * A concise explanation of why this campaign requires a dedicated number pool. Include operational or regulatory justifications, such as high-volume messaging, the use of multiple sender identities, or throughput guarantees. + * + * @return reason + */ + @JsonProperty("reason") + public String getReason() { + return reason; + } + + /** + * Sets reason. + *

+ * Field description: + * A concise explanation of why this campaign requires a dedicated number pool. Include operational or regulatory justifications, such as high-volume messaging, the use of multiple sender identities, or throughput guarantees. + * + * @param reason + */ + @JsonProperty("reason") + public void setReason(String reason) { + this.reason = reason; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersAttachNumberPoolRequest numbersAttachNumberPoolRequest = (NumbersAttachNumberPoolRequest) o; + return Objects.equals(this.numberPoolId, numbersAttachNumberPoolRequest.numberPoolId) + && Objects.equals(this.reason, numbersAttachNumberPoolRequest.reason); + } + + @Override + public int hashCode() { + return Objects.hash(numberPoolId, reason); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersAttachNumberPoolRequest {") + .append(newLine) + .append(" numberPoolId: ") + .append(toIndentedString(numberPoolId)) + .append(newLine) + .append(" reason: ") + .append(toIndentedString(reason)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrand.java b/src/main/java/com/infobip/model/NumbersBrand.java new file mode 100644 index 0000000..6a8cd7a --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrand.java @@ -0,0 +1,466 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents NumbersBrand model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = NumbersGovernmentBrand.class, name = "TENDLC_GOVERNMENT"), + @JsonSubTypes.Type(value = NumbersNonProfitBrand.class, name = "TENDLC_NON_PROFIT"), + @JsonSubTypes.Type(value = NumbersPrivateCompanyBrand.class, name = "TENDLC_PRIVATE_COMPANY"), + @JsonSubTypes.Type(value = NumbersPublicCompanyBrand.class, name = "TENDLC_PUBLIC_COMPANY"), + @JsonSubTypes.Type(value = NumbersTollFreeBrand.class, name = "TOLL_FREE_NUMBER"), +}) +public abstract class NumbersBrand { + + private UUID id; + + private String applicationId; + + private String entityId; + + private String name; + + private NumbersBrandStage stage; + + private String website; + + private OffsetDateTime createdDate; + + private OffsetDateTime lastModifiedDate; + + protected final NumbersBrandType type; + + /** + * Constructs a new {@link NumbersBrand} instance. + */ + public NumbersBrand(String type) { + this.type = NumbersBrandType.fromValue(type); + } + + /** + * Sets id. + *

+ * Field description: + * The identifier for the brand. + * + * @param id + * @return This {@link NumbersBrand instance}. + */ + public NumbersBrand id(UUID id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The identifier for the brand. + * + * @return id + */ + @JsonProperty("id") + public UUID getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The identifier for the brand. + * + * @param id + */ + @JsonProperty("id") + public void setId(UUID id) { + this.id = id; + } + + /** + * Sets applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @param applicationId + * @return This {@link NumbersBrand instance}. + */ + public NumbersBrand applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @param entityId + * @return This {@link NumbersBrand instance}. + */ + public NumbersBrand entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * Sets name. + *

+ * Field description: + * The customer defined name of brand. + *

+ * The field is required. + * + * @param name + * @return This {@link NumbersBrand instance}. + */ + public NumbersBrand name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * The customer defined name of brand. + *

+ * The field is required. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * The customer defined name of brand. + *

+ * The field is required. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets stage. + * + * @param stage + * @return This {@link NumbersBrand instance}. + */ + public NumbersBrand stage(NumbersBrandStage stage) { + this.stage = stage; + return this; + } + + /** + * Returns stage. + * + * @return stage + */ + @JsonProperty("stage") + public NumbersBrandStage getStage() { + return stage; + } + + /** + * Sets stage. + * + * @param stage + */ + @JsonProperty("stage") + public void setStage(NumbersBrandStage stage) { + this.stage = stage; + } + + /** + * Sets website. + *

+ * Field description: + * The website for the brand. + *

+ * The field is required. + * + * @param website + * @return This {@link NumbersBrand instance}. + */ + public NumbersBrand website(String website) { + this.website = website; + return this; + } + + /** + * Returns website. + *

+ * Field description: + * The website for the brand. + *

+ * The field is required. + * + * @return website + */ + @JsonProperty("website") + public String getWebsite() { + return website; + } + + /** + * Sets website. + *

+ * Field description: + * The website for the brand. + *

+ * The field is required. + * + * @param website + */ + @JsonProperty("website") + public void setWebsite(String website) { + this.website = website; + } + + /** + * Sets createdDate. + *

+ * Field description: + * The date and time when the brand was created. + * + * @param createdDate + * @return This {@link NumbersBrand instance}. + */ + public NumbersBrand createdDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Returns createdDate. + *

+ * Field description: + * The date and time when the brand was created. + * + * @return createdDate + */ + @JsonProperty("createdDate") + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + /** + * Sets createdDate. + *

+ * Field description: + * The date and time when the brand was created. + * + * @param createdDate + */ + @JsonProperty("createdDate") + public void setCreatedDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + /** + * Sets lastModifiedDate. + *

+ * Field description: + * The date and time when the brand was last modified. + * + * @param lastModifiedDate + * @return This {@link NumbersBrand instance}. + */ + public NumbersBrand lastModifiedDate(OffsetDateTime lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + return this; + } + + /** + * Returns lastModifiedDate. + *

+ * Field description: + * The date and time when the brand was last modified. + * + * @return lastModifiedDate + */ + @JsonProperty("lastModifiedDate") + public OffsetDateTime getLastModifiedDate() { + return lastModifiedDate; + } + + /** + * Sets lastModifiedDate. + *

+ * Field description: + * The date and time when the brand was last modified. + * + * @param lastModifiedDate + */ + @JsonProperty("lastModifiedDate") + public void setLastModifiedDate(OffsetDateTime lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public NumbersBrandType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrand numbersBrand = (NumbersBrand) o; + return Objects.equals(this.id, numbersBrand.id) + && Objects.equals(this.applicationId, numbersBrand.applicationId) + && Objects.equals(this.entityId, numbersBrand.entityId) + && Objects.equals(this.name, numbersBrand.name) + && Objects.equals(this.stage, numbersBrand.stage) + && Objects.equals(this.website, numbersBrand.website) + && Objects.equals(this.createdDate, numbersBrand.createdDate) + && Objects.equals(this.lastModifiedDate, numbersBrand.lastModifiedDate) + && Objects.equals(this.type, numbersBrand.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, applicationId, entityId, name, stage, website, createdDate, lastModifiedDate, type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrand {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" stage: ") + .append(toIndentedString(stage)) + .append(newLine) + .append(" website: ") + .append(toIndentedString(website)) + .append(newLine) + .append(" createdDate: ") + .append(toIndentedString(createdDate)) + .append(newLine) + .append(" lastModifiedDate: ") + .append(toIndentedString(lastModifiedDate)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookContent.java b/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookContent.java new file mode 100644 index 0000000..db30d38 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookContent.java @@ -0,0 +1,184 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.UUID; + +/** + * Event content. + */ +public class NumbersBrandAuthUpdateWebhookContent { + + private UUID brandId; + + /** + * The new brand auth 2FA update. + */ + public enum BrandAuthUpdateEnum { + SEND("BRAND_EMAIL_2FA_SEND"), + COMPLETE("BRAND_EMAIL_2FA_COMPLETE"); + + private String value; + + BrandAuthUpdateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BrandAuthUpdateEnum fromValue(String value) { + for (BrandAuthUpdateEnum enumElement : BrandAuthUpdateEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private BrandAuthUpdateEnum brandAuthUpdate; + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand. + * + * @param brandId + * @return This {@link NumbersBrandAuthUpdateWebhookContent instance}. + */ + public NumbersBrandAuthUpdateWebhookContent brandId(UUID brandId) { + this.brandId = brandId; + return this; + } + + /** + * Returns brandId. + *

+ * Field description: + * The ID of the brand. + * + * @return brandId + */ + @JsonProperty("brandId") + public UUID getBrandId() { + return brandId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand. + * + * @param brandId + */ + @JsonProperty("brandId") + public void setBrandId(UUID brandId) { + this.brandId = brandId; + } + + /** + * Sets brandAuthUpdate. + *

+ * Field description: + * The new brand auth 2FA update. + * + * @param brandAuthUpdate + * @return This {@link NumbersBrandAuthUpdateWebhookContent instance}. + */ + public NumbersBrandAuthUpdateWebhookContent brandAuthUpdate(BrandAuthUpdateEnum brandAuthUpdate) { + this.brandAuthUpdate = brandAuthUpdate; + return this; + } + + /** + * Returns brandAuthUpdate. + *

+ * Field description: + * The new brand auth 2FA update. + * + * @return brandAuthUpdate + */ + @JsonProperty("brandAuthUpdate") + public BrandAuthUpdateEnum getBrandAuthUpdate() { + return brandAuthUpdate; + } + + /** + * Sets brandAuthUpdate. + *

+ * Field description: + * The new brand auth 2FA update. + * + * @param brandAuthUpdate + */ + @JsonProperty("brandAuthUpdate") + public void setBrandAuthUpdate(BrandAuthUpdateEnum brandAuthUpdate) { + this.brandAuthUpdate = brandAuthUpdate; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandAuthUpdateWebhookContent numbersBrandAuthUpdateWebhookContent = + (NumbersBrandAuthUpdateWebhookContent) o; + return Objects.equals(this.brandId, numbersBrandAuthUpdateWebhookContent.brandId) + && Objects.equals(this.brandAuthUpdate, numbersBrandAuthUpdateWebhookContent.brandAuthUpdate); + } + + @Override + public int hashCode() { + return Objects.hash(brandId, brandAuthUpdate); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandAuthUpdateWebhookContent {") + .append(newLine) + .append(" brandId: ") + .append(toIndentedString(brandId)) + .append(newLine) + .append(" brandAuthUpdate: ") + .append(toIndentedString(brandAuthUpdate)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookMessage.java b/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookMessage.java new file mode 100644 index 0000000..0f619fd --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookMessage.java @@ -0,0 +1,256 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Incoming events + */ +public class NumbersBrandAuthUpdateWebhookMessage { + /** + * The name of the event. + */ + public enum EventEnum { + BRAND_AUTH_UPDATE("BRAND_AUTH_UPDATE"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventEnum fromValue(String value) { + for (EventEnum enumElement : EventEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private EventEnum event; + + private OffsetDateTime receivedAt; + + private NumbersBrandAuthUpdateWebhookContent content; + + private NumbersBrandWebhookPlatform platform; + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + * @return This {@link NumbersBrandAuthUpdateWebhookMessage instance}. + */ + public NumbersBrandAuthUpdateWebhookMessage event(EventEnum event) { + this.event = event; + return this; + } + + /** + * Returns event. + *

+ * Field description: + * The name of the event. + * + * @return event + */ + @JsonProperty("event") + public EventEnum getEvent() { + return event; + } + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + */ + @JsonProperty("event") + public void setEvent(EventEnum event) { + this.event = event; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + * @return This {@link NumbersBrandAuthUpdateWebhookMessage instance}. + */ + public NumbersBrandAuthUpdateWebhookMessage receivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + return this; + } + + /** + * Returns receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @return receivedAt + */ + @JsonProperty("receivedAt") + public OffsetDateTime getReceivedAt() { + return receivedAt; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + */ + @JsonProperty("receivedAt") + public void setReceivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + } + + /** + * Sets content. + * + * @param content + * @return This {@link NumbersBrandAuthUpdateWebhookMessage instance}. + */ + public NumbersBrandAuthUpdateWebhookMessage content(NumbersBrandAuthUpdateWebhookContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + * + * @return content + */ + @JsonProperty("content") + public NumbersBrandAuthUpdateWebhookContent getContent() { + return content; + } + + /** + * Sets content. + * + * @param content + */ + @JsonProperty("content") + public void setContent(NumbersBrandAuthUpdateWebhookContent content) { + this.content = content; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link NumbersBrandAuthUpdateWebhookMessage instance}. + */ + public NumbersBrandAuthUpdateWebhookMessage platform(NumbersBrandWebhookPlatform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public NumbersBrandWebhookPlatform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(NumbersBrandWebhookPlatform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandAuthUpdateWebhookMessage numbersBrandAuthUpdateWebhookMessage = + (NumbersBrandAuthUpdateWebhookMessage) o; + return Objects.equals(this.event, numbersBrandAuthUpdateWebhookMessage.event) + && Objects.equals(this.receivedAt, numbersBrandAuthUpdateWebhookMessage.receivedAt) + && Objects.equals(this.content, numbersBrandAuthUpdateWebhookMessage.content) + && Objects.equals(this.platform, numbersBrandAuthUpdateWebhookMessage.platform); + } + + @Override + public int hashCode() { + return Objects.hash(event, receivedAt, content, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandAuthUpdateWebhookMessage {") + .append(newLine) + .append(" event: ") + .append(toIndentedString(event)) + .append(newLine) + .append(" receivedAt: ") + .append(toIndentedString(receivedAt)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookResponse.java b/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookResponse.java new file mode 100644 index 0000000..130d8f9 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandAuthUpdateWebhookResponse.java @@ -0,0 +1,120 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersBrandAuthUpdateWebhookResponse model. + */ +public class NumbersBrandAuthUpdateWebhookResponse { + + private List results = null; + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + * @return This {@link NumbersBrandAuthUpdateWebhookResponse instance}. + */ + public NumbersBrandAuthUpdateWebhookResponse results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * Incoming events + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersBrandAuthUpdateWebhookResponse instance}. + */ + public NumbersBrandAuthUpdateWebhookResponse addResultsItem(NumbersBrandAuthUpdateWebhookMessage resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * Incoming events + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandAuthUpdateWebhookResponse numbersBrandAuthUpdateWebhookResponse = + (NumbersBrandAuthUpdateWebhookResponse) o; + return Objects.equals(this.results, numbersBrandAuthUpdateWebhookResponse.results); + } + + @Override + public int hashCode() { + return Objects.hash(results); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandAuthUpdateWebhookResponse {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandPreview.java b/src/main/java/com/infobip/model/NumbersBrandPreview.java new file mode 100644 index 0000000..c110537 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandPreview.java @@ -0,0 +1,192 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The preview of brand details to use with the campaign. This property is read-only and ignored in POST/PUT calls. + */ +public class NumbersBrandPreview { + + private String brandId; + + private String brandName; + + private String website; + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand. + * + * @param brandId + * @return This {@link NumbersBrandPreview instance}. + */ + public NumbersBrandPreview brandId(String brandId) { + this.brandId = brandId; + return this; + } + + /** + * Returns brandId. + *

+ * Field description: + * The ID of the brand. + * + * @return brandId + */ + @JsonProperty("brandId") + public String getBrandId() { + return brandId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand. + * + * @param brandId + */ + @JsonProperty("brandId") + public void setBrandId(String brandId) { + this.brandId = brandId; + } + + /** + * Sets brandName. + *

+ * Field description: + * The name of the brand. + * + * @param brandName + * @return This {@link NumbersBrandPreview instance}. + */ + public NumbersBrandPreview brandName(String brandName) { + this.brandName = brandName; + return this; + } + + /** + * Returns brandName. + *

+ * Field description: + * The name of the brand. + * + * @return brandName + */ + @JsonProperty("brandName") + public String getBrandName() { + return brandName; + } + + /** + * Sets brandName. + *

+ * Field description: + * The name of the brand. + * + * @param brandName + */ + @JsonProperty("brandName") + public void setBrandName(String brandName) { + this.brandName = brandName; + } + + /** + * Sets website. + *

+ * Field description: + * The website for the brand. + * + * @param website + * @return This {@link NumbersBrandPreview instance}. + */ + public NumbersBrandPreview website(String website) { + this.website = website; + return this; + } + + /** + * Returns website. + *

+ * Field description: + * The website for the brand. + * + * @return website + */ + @JsonProperty("website") + public String getWebsite() { + return website; + } + + /** + * Sets website. + *

+ * Field description: + * The website for the brand. + * + * @param website + */ + @JsonProperty("website") + public void setWebsite(String website) { + this.website = website; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandPreview numbersBrandPreview = (NumbersBrandPreview) o; + return Objects.equals(this.brandId, numbersBrandPreview.brandId) + && Objects.equals(this.brandName, numbersBrandPreview.brandName) + && Objects.equals(this.website, numbersBrandPreview.website); + } + + @Override + public int hashCode() { + return Objects.hash(brandId, brandName, website); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandPreview {") + .append(newLine) + .append(" brandId: ") + .append(toIndentedString(brandId)) + .append(newLine) + .append(" brandName: ") + .append(toIndentedString(brandName)) + .append(newLine) + .append(" website: ") + .append(toIndentedString(website)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandRegistrar.java b/src/main/java/com/infobip/model/NumbersBrandRegistrar.java new file mode 100644 index 0000000..9b74d8b --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandRegistrar.java @@ -0,0 +1,46 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The name of the registrar with which the brand has been registered. + */ +public enum NumbersBrandRegistrar { + CAMPAIGN_REGISTRY("CAMPAIGN_REGISTRY"); + + private final String value; + + NumbersBrandRegistrar(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersBrandRegistrar fromValue(String value) { + for (NumbersBrandRegistrar enumElement : NumbersBrandRegistrar.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandRegistrationStatusPublic.java b/src/main/java/com/infobip/model/NumbersBrandRegistrationStatusPublic.java new file mode 100644 index 0000000..ff471f7 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandRegistrationStatusPublic.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of the registration for this brand. + */ +public enum NumbersBrandRegistrationStatusPublic { + ACTIVE("ACTIVE"), + PENDING("PENDING"), + PENDING_2FA("PENDING_2FA"), + REJECTED("REJECTED"); + + private final String value; + + NumbersBrandRegistrationStatusPublic(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersBrandRegistrationStatusPublic fromValue(String value) { + for (NumbersBrandRegistrationStatusPublic enumElement : NumbersBrandRegistrationStatusPublic.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookContent.java b/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookContent.java new file mode 100644 index 0000000..e72de66 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookContent.java @@ -0,0 +1,204 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Event content. + */ +public class NumbersBrandRegistrationWebhookContent { + + private UUID brandId; + + private NumbersWebhookBrandRegistrationStatus brandStatus; + + private List rejectionReasons = null; + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand. + * + * @param brandId + * @return This {@link NumbersBrandRegistrationWebhookContent instance}. + */ + public NumbersBrandRegistrationWebhookContent brandId(UUID brandId) { + this.brandId = brandId; + return this; + } + + /** + * Returns brandId. + *

+ * Field description: + * The ID of the brand. + * + * @return brandId + */ + @JsonProperty("brandId") + public UUID getBrandId() { + return brandId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand. + * + * @param brandId + */ + @JsonProperty("brandId") + public void setBrandId(UUID brandId) { + this.brandId = brandId; + } + + /** + * Sets brandStatus. + * + * @param brandStatus + * @return This {@link NumbersBrandRegistrationWebhookContent instance}. + */ + public NumbersBrandRegistrationWebhookContent brandStatus(NumbersWebhookBrandRegistrationStatus brandStatus) { + this.brandStatus = brandStatus; + return this; + } + + /** + * Returns brandStatus. + * + * @return brandStatus + */ + @JsonProperty("brandStatus") + public NumbersWebhookBrandRegistrationStatus getBrandStatus() { + return brandStatus; + } + + /** + * Sets brandStatus. + * + * @param brandStatus + */ + @JsonProperty("brandStatus") + public void setBrandStatus(NumbersWebhookBrandRegistrationStatus brandStatus) { + this.brandStatus = brandStatus; + } + + /** + * Sets rejectionReasons. + *

+ * Field description: + * The rejection reasons. This field is present only when brand registration status is 'FAILURE'. + * + * @param rejectionReasons + * @return This {@link NumbersBrandRegistrationWebhookContent instance}. + */ + public NumbersBrandRegistrationWebhookContent rejectionReasons(List rejectionReasons) { + this.rejectionReasons = rejectionReasons; + return this; + } + + /** + * Adds and item into rejectionReasons. + *

+ * Field description: + * The rejection reasons. This field is present only when brand registration status is 'FAILURE'. + * + * @param rejectionReasonsItem The item to be added to the list. + * @return This {@link NumbersBrandRegistrationWebhookContent instance}. + */ + public NumbersBrandRegistrationWebhookContent addRejectionReasonsItem(String rejectionReasonsItem) { + if (this.rejectionReasons == null) { + this.rejectionReasons = new ArrayList<>(); + } + this.rejectionReasons.add(rejectionReasonsItem); + return this; + } + + /** + * Returns rejectionReasons. + *

+ * Field description: + * The rejection reasons. This field is present only when brand registration status is 'FAILURE'. + * + * @return rejectionReasons + */ + @JsonProperty("rejectionReasons") + public List getRejectionReasons() { + return rejectionReasons; + } + + /** + * Sets rejectionReasons. + *

+ * Field description: + * The rejection reasons. This field is present only when brand registration status is 'FAILURE'. + * + * @param rejectionReasons + */ + @JsonProperty("rejectionReasons") + public void setRejectionReasons(List rejectionReasons) { + this.rejectionReasons = rejectionReasons; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandRegistrationWebhookContent numbersBrandRegistrationWebhookContent = + (NumbersBrandRegistrationWebhookContent) o; + return Objects.equals(this.brandId, numbersBrandRegistrationWebhookContent.brandId) + && Objects.equals(this.brandStatus, numbersBrandRegistrationWebhookContent.brandStatus) + && Objects.equals(this.rejectionReasons, numbersBrandRegistrationWebhookContent.rejectionReasons); + } + + @Override + public int hashCode() { + return Objects.hash(brandId, brandStatus, rejectionReasons); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandRegistrationWebhookContent {") + .append(newLine) + .append(" brandId: ") + .append(toIndentedString(brandId)) + .append(newLine) + .append(" brandStatus: ") + .append(toIndentedString(brandStatus)) + .append(newLine) + .append(" rejectionReasons: ") + .append(toIndentedString(rejectionReasons)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookMessage.java b/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookMessage.java new file mode 100644 index 0000000..81b2202 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookMessage.java @@ -0,0 +1,256 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Incoming events + */ +public class NumbersBrandRegistrationWebhookMessage { + /** + * The name of the event. + */ + public enum EventEnum { + BRAND_STATUS_UPDATE("BRAND_STATUS_UPDATE"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventEnum fromValue(String value) { + for (EventEnum enumElement : EventEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private EventEnum event; + + private OffsetDateTime receivedAt; + + private NumbersBrandRegistrationWebhookContent content; + + private NumbersBrandWebhookPlatform platform; + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + * @return This {@link NumbersBrandRegistrationWebhookMessage instance}. + */ + public NumbersBrandRegistrationWebhookMessage event(EventEnum event) { + this.event = event; + return this; + } + + /** + * Returns event. + *

+ * Field description: + * The name of the event. + * + * @return event + */ + @JsonProperty("event") + public EventEnum getEvent() { + return event; + } + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + */ + @JsonProperty("event") + public void setEvent(EventEnum event) { + this.event = event; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + * @return This {@link NumbersBrandRegistrationWebhookMessage instance}. + */ + public NumbersBrandRegistrationWebhookMessage receivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + return this; + } + + /** + * Returns receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @return receivedAt + */ + @JsonProperty("receivedAt") + public OffsetDateTime getReceivedAt() { + return receivedAt; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + */ + @JsonProperty("receivedAt") + public void setReceivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + } + + /** + * Sets content. + * + * @param content + * @return This {@link NumbersBrandRegistrationWebhookMessage instance}. + */ + public NumbersBrandRegistrationWebhookMessage content(NumbersBrandRegistrationWebhookContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + * + * @return content + */ + @JsonProperty("content") + public NumbersBrandRegistrationWebhookContent getContent() { + return content; + } + + /** + * Sets content. + * + * @param content + */ + @JsonProperty("content") + public void setContent(NumbersBrandRegistrationWebhookContent content) { + this.content = content; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link NumbersBrandRegistrationWebhookMessage instance}. + */ + public NumbersBrandRegistrationWebhookMessage platform(NumbersBrandWebhookPlatform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public NumbersBrandWebhookPlatform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(NumbersBrandWebhookPlatform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandRegistrationWebhookMessage numbersBrandRegistrationWebhookMessage = + (NumbersBrandRegistrationWebhookMessage) o; + return Objects.equals(this.event, numbersBrandRegistrationWebhookMessage.event) + && Objects.equals(this.receivedAt, numbersBrandRegistrationWebhookMessage.receivedAt) + && Objects.equals(this.content, numbersBrandRegistrationWebhookMessage.content) + && Objects.equals(this.platform, numbersBrandRegistrationWebhookMessage.platform); + } + + @Override + public int hashCode() { + return Objects.hash(event, receivedAt, content, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandRegistrationWebhookMessage {") + .append(newLine) + .append(" event: ") + .append(toIndentedString(event)) + .append(newLine) + .append(" receivedAt: ") + .append(toIndentedString(receivedAt)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookResponse.java b/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookResponse.java new file mode 100644 index 0000000..7d45631 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandRegistrationWebhookResponse.java @@ -0,0 +1,120 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersBrandRegistrationWebhookResponse model. + */ +public class NumbersBrandRegistrationWebhookResponse { + + private List results = null; + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + * @return This {@link NumbersBrandRegistrationWebhookResponse instance}. + */ + public NumbersBrandRegistrationWebhookResponse results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * Incoming events + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersBrandRegistrationWebhookResponse instance}. + */ + public NumbersBrandRegistrationWebhookResponse addResultsItem(NumbersBrandRegistrationWebhookMessage resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * Incoming events + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandRegistrationWebhookResponse numbersBrandRegistrationWebhookResponse = + (NumbersBrandRegistrationWebhookResponse) o; + return Objects.equals(this.results, numbersBrandRegistrationWebhookResponse.results); + } + + @Override + public int hashCode() { + return Objects.hash(results); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandRegistrationWebhookResponse {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandStage.java b/src/main/java/com/infobip/model/NumbersBrandStage.java new file mode 100644 index 0000000..5cf19dd --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandStage.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersBrandStage enumeration. + */ +public enum NumbersBrandStage { + DRAFT("DRAFT"), + SUBMITTED("SUBMITTED"); + + private final String value; + + NumbersBrandStage(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersBrandStage fromValue(String value) { + for (NumbersBrandStage enumElement : NumbersBrandStage.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandStatus.java b/src/main/java/com/infobip/model/NumbersBrandStatus.java new file mode 100644 index 0000000..212568b --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandStatus.java @@ -0,0 +1,340 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; + +/** + * Represents NumbersBrandStatus model. + */ +public class NumbersBrandStatus { + + private NumbersBrandRegistrar registrar; + + private NumbersBrandRegistrationStatusPublic state; + + /** + * The status of the brand as determined by the registrar. + */ + public enum BrandIdentityStatusEnum { + SELF_DECLARED("SELF_DECLARED"), + UNVERIFIED("UNVERIFIED"), + VERIFIED("VERIFIED"), + VETTED_VERIFIED("VETTED_VERIFIED"); + + private String value; + + BrandIdentityStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BrandIdentityStatusEnum fromValue(String value) { + for (BrandIdentityStatusEnum enumElement : BrandIdentityStatusEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private BrandIdentityStatusEnum brandIdentityStatus; + + /** + * The status of brand authentication applicable for TENDLC_PUBLIC_COMPANY brand type. + */ + public enum BrandAuthenticationStatusEnum { + PENDING("PENDING"), + ACTIVE("ACTIVE"), + FAILED("FAILED"), + EXPIRED("EXPIRED"); + + private String value; + + BrandAuthenticationStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BrandAuthenticationStatusEnum fromValue(String value) { + for (BrandAuthenticationStatusEnum enumElement : BrandAuthenticationStatusEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private BrandAuthenticationStatusEnum brandAuthenticationStatus; + + private String rejectionReason; + + /** + * Sets registrar. + * + * @param registrar + * @return This {@link NumbersBrandStatus instance}. + */ + public NumbersBrandStatus registrar(NumbersBrandRegistrar registrar) { + this.registrar = registrar; + return this; + } + + /** + * Returns registrar. + * + * @return registrar + */ + @JsonProperty("registrar") + public NumbersBrandRegistrar getRegistrar() { + return registrar; + } + + /** + * Sets registrar. + * + * @param registrar + */ + @JsonProperty("registrar") + public void setRegistrar(NumbersBrandRegistrar registrar) { + this.registrar = registrar; + } + + /** + * Sets state. + * + * @param state + * @return This {@link NumbersBrandStatus instance}. + */ + public NumbersBrandStatus state(NumbersBrandRegistrationStatusPublic state) { + this.state = state; + return this; + } + + /** + * Returns state. + * + * @return state + */ + @JsonProperty("state") + public NumbersBrandRegistrationStatusPublic getState() { + return state; + } + + /** + * Sets state. + * + * @param state + */ + @JsonProperty("state") + public void setState(NumbersBrandRegistrationStatusPublic state) { + this.state = state; + } + + /** + * Sets brandIdentityStatus. + *

+ * Field description: + * The status of the brand as determined by the registrar. + * + * @param brandIdentityStatus + * @return This {@link NumbersBrandStatus instance}. + */ + public NumbersBrandStatus brandIdentityStatus(BrandIdentityStatusEnum brandIdentityStatus) { + this.brandIdentityStatus = brandIdentityStatus; + return this; + } + + /** + * Returns brandIdentityStatus. + *

+ * Field description: + * The status of the brand as determined by the registrar. + * + * @return brandIdentityStatus + */ + @JsonProperty("brandIdentityStatus") + public BrandIdentityStatusEnum getBrandIdentityStatus() { + return brandIdentityStatus; + } + + /** + * Sets brandIdentityStatus. + *

+ * Field description: + * The status of the brand as determined by the registrar. + * + * @param brandIdentityStatus + */ + @JsonProperty("brandIdentityStatus") + public void setBrandIdentityStatus(BrandIdentityStatusEnum brandIdentityStatus) { + this.brandIdentityStatus = brandIdentityStatus; + } + + /** + * Sets brandAuthenticationStatus. + *

+ * Field description: + * The status of brand authentication applicable for TENDLC_PUBLIC_COMPANY brand type. + * + * @param brandAuthenticationStatus + * @return This {@link NumbersBrandStatus instance}. + */ + public NumbersBrandStatus brandAuthenticationStatus(BrandAuthenticationStatusEnum brandAuthenticationStatus) { + this.brandAuthenticationStatus = brandAuthenticationStatus; + return this; + } + + /** + * Returns brandAuthenticationStatus. + *

+ * Field description: + * The status of brand authentication applicable for TENDLC_PUBLIC_COMPANY brand type. + * + * @return brandAuthenticationStatus + */ + @JsonProperty("brandAuthenticationStatus") + public BrandAuthenticationStatusEnum getBrandAuthenticationStatus() { + return brandAuthenticationStatus; + } + + /** + * Sets brandAuthenticationStatus. + *

+ * Field description: + * The status of brand authentication applicable for TENDLC_PUBLIC_COMPANY brand type. + * + * @param brandAuthenticationStatus + */ + @JsonProperty("brandAuthenticationStatus") + public void setBrandAuthenticationStatus(BrandAuthenticationStatusEnum brandAuthenticationStatus) { + this.brandAuthenticationStatus = brandAuthenticationStatus; + } + + /** + * Sets rejectionReason. + *

+ * Field description: + * The reason for brand registration rejection. + * + * @param rejectionReason + * @return This {@link NumbersBrandStatus instance}. + */ + public NumbersBrandStatus rejectionReason(String rejectionReason) { + this.rejectionReason = rejectionReason; + return this; + } + + /** + * Returns rejectionReason. + *

+ * Field description: + * The reason for brand registration rejection. + * + * @return rejectionReason + */ + @JsonProperty("rejectionReason") + public String getRejectionReason() { + return rejectionReason; + } + + /** + * Sets rejectionReason. + *

+ * Field description: + * The reason for brand registration rejection. + * + * @param rejectionReason + */ + @JsonProperty("rejectionReason") + public void setRejectionReason(String rejectionReason) { + this.rejectionReason = rejectionReason; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandStatus numbersBrandStatus = (NumbersBrandStatus) o; + return Objects.equals(this.registrar, numbersBrandStatus.registrar) + && Objects.equals(this.state, numbersBrandStatus.state) + && Objects.equals(this.brandIdentityStatus, numbersBrandStatus.brandIdentityStatus) + && Objects.equals(this.brandAuthenticationStatus, numbersBrandStatus.brandAuthenticationStatus) + && Objects.equals(this.rejectionReason, numbersBrandStatus.rejectionReason); + } + + @Override + public int hashCode() { + return Objects.hash(registrar, state, brandIdentityStatus, brandAuthenticationStatus, rejectionReason); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandStatus {") + .append(newLine) + .append(" registrar: ") + .append(toIndentedString(registrar)) + .append(newLine) + .append(" state: ") + .append(toIndentedString(state)) + .append(newLine) + .append(" brandIdentityStatus: ") + .append(toIndentedString(brandIdentityStatus)) + .append(newLine) + .append(" brandAuthenticationStatus: ") + .append(toIndentedString(brandAuthenticationStatus)) + .append(newLine) + .append(" rejectionReason: ") + .append(toIndentedString(rejectionReason)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandType.java b/src/main/java/com/infobip/model/NumbersBrandType.java new file mode 100644 index 0000000..fb59beb --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandType.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of brand. + */ +public enum NumbersBrandType { + NON_PROFIT("TENDLC_NON_PROFIT"), + PRIVATE_COMPANY("TENDLC_PRIVATE_COMPANY"), + PUBLIC_COMPANY("TENDLC_PUBLIC_COMPANY"), + GOVERNMENT("TENDLC_GOVERNMENT"); + + private final String value; + + NumbersBrandType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersBrandType fromValue(String value) { + for (NumbersBrandType enumElement : NumbersBrandType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandVet.java b/src/main/java/com/infobip/model/NumbersBrandVet.java new file mode 100644 index 0000000..32dc547 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandVet.java @@ -0,0 +1,450 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.UUID; + +/** + * The list of the results for this page. + */ +public class NumbersBrandVet { + + private UUID vetId; + + private UUID brandId; + + private Integer score; + + private OffsetDateTime vettedDate; + + private OffsetDateTime enhancedVettedDate; + + private NumbersBrandVetStatus status; + + private NumbersVettingType type; + + private Boolean imported; + + private NumbersVettingProvider importedVetProvider; + + /** + * Sets vetId. + *

+ * Field description: + * The ID of the vet record. + * + * @param vetId + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet vetId(UUID vetId) { + this.vetId = vetId; + return this; + } + + /** + * Returns vetId. + *

+ * Field description: + * The ID of the vet record. + * + * @return vetId + */ + @JsonProperty("vetId") + public UUID getVetId() { + return vetId; + } + + /** + * Sets vetId. + *

+ * Field description: + * The ID of the vet record. + * + * @param vetId + */ + @JsonProperty("vetId") + public void setVetId(UUID vetId) { + this.vetId = vetId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand the vet belongs to. + * + * @param brandId + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet brandId(UUID brandId) { + this.brandId = brandId; + return this; + } + + /** + * Returns brandId. + *

+ * Field description: + * The ID of the brand the vet belongs to. + * + * @return brandId + */ + @JsonProperty("brandId") + public UUID getBrandId() { + return brandId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand the vet belongs to. + * + * @param brandId + */ + @JsonProperty("brandId") + public void setBrandId(UUID brandId) { + this.brandId = brandId; + } + + /** + * Sets score. + *

+ * Field description: + * The score the brand received after being vetted. + * + * @param score + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet score(Integer score) { + this.score = score; + return this; + } + + /** + * Returns score. + *

+ * Field description: + * The score the brand received after being vetted. + * + * @return score + */ + @JsonProperty("score") + public Integer getScore() { + return score; + } + + /** + * Sets score. + *

+ * Field description: + * The score the brand received after being vetted. + * + * @param score + */ + @JsonProperty("score") + public void setScore(Integer score) { + this.score = score; + } + + /** + * Sets vettedDate. + *

+ * Field description: + * The date the vet was completed. + * + * @param vettedDate + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet vettedDate(OffsetDateTime vettedDate) { + this.vettedDate = vettedDate; + return this; + } + + /** + * Returns vettedDate. + *

+ * Field description: + * The date the vet was completed. + * + * @return vettedDate + */ + @JsonProperty("vettedDate") + public OffsetDateTime getVettedDate() { + return vettedDate; + } + + /** + * Sets vettedDate. + *

+ * Field description: + * The date the vet was completed. + * + * @param vettedDate + */ + @JsonProperty("vettedDate") + public void setVettedDate(OffsetDateTime vettedDate) { + this.vettedDate = vettedDate; + } + + /** + * Sets enhancedVettedDate. + *

+ * Field description: + * The date the vet was completed if it was an enhanced vet or if it was converted to enhanced from a standard vet. + * + * @param enhancedVettedDate + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet enhancedVettedDate(OffsetDateTime enhancedVettedDate) { + this.enhancedVettedDate = enhancedVettedDate; + return this; + } + + /** + * Returns enhancedVettedDate. + *

+ * Field description: + * The date the vet was completed if it was an enhanced vet or if it was converted to enhanced from a standard vet. + * + * @return enhancedVettedDate + */ + @JsonProperty("enhancedVettedDate") + public OffsetDateTime getEnhancedVettedDate() { + return enhancedVettedDate; + } + + /** + * Sets enhancedVettedDate. + *

+ * Field description: + * The date the vet was completed if it was an enhanced vet or if it was converted to enhanced from a standard vet. + * + * @param enhancedVettedDate + */ + @JsonProperty("enhancedVettedDate") + public void setEnhancedVettedDate(OffsetDateTime enhancedVettedDate) { + this.enhancedVettedDate = enhancedVettedDate; + } + + /** + * Sets status. + * + * @param status + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet status(NumbersBrandVetStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + * + * @return status + */ + @JsonProperty("status") + public NumbersBrandVetStatus getStatus() { + return status; + } + + /** + * Sets status. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(NumbersBrandVetStatus status) { + this.status = status; + } + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet type(NumbersVettingType type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public NumbersVettingType getType() { + return type; + } + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(NumbersVettingType type) { + this.type = type; + } + + /** + * Sets imported. + *

+ * Field description: + * Showing is brand vet imported. + * + * @param imported + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet imported(Boolean imported) { + this.imported = imported; + return this; + } + + /** + * Returns imported. + *

+ * Field description: + * Showing is brand vet imported. + * + * @return imported + */ + @JsonProperty("imported") + public Boolean getImported() { + return imported; + } + + /** + * Sets imported. + *

+ * Field description: + * Showing is brand vet imported. + * + * @param imported + */ + @JsonProperty("imported") + public void setImported(Boolean imported) { + this.imported = imported; + } + + /** + * Sets importedVetProvider. + * + * @param importedVetProvider + * @return This {@link NumbersBrandVet instance}. + */ + public NumbersBrandVet importedVetProvider(NumbersVettingProvider importedVetProvider) { + this.importedVetProvider = importedVetProvider; + return this; + } + + /** + * Returns importedVetProvider. + * + * @return importedVetProvider + */ + @JsonProperty("importedVetProvider") + public NumbersVettingProvider getImportedVetProvider() { + return importedVetProvider; + } + + /** + * Sets importedVetProvider. + * + * @param importedVetProvider + */ + @JsonProperty("importedVetProvider") + public void setImportedVetProvider(NumbersVettingProvider importedVetProvider) { + this.importedVetProvider = importedVetProvider; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandVet numbersBrandVet = (NumbersBrandVet) o; + return Objects.equals(this.vetId, numbersBrandVet.vetId) + && Objects.equals(this.brandId, numbersBrandVet.brandId) + && Objects.equals(this.score, numbersBrandVet.score) + && Objects.equals(this.vettedDate, numbersBrandVet.vettedDate) + && Objects.equals(this.enhancedVettedDate, numbersBrandVet.enhancedVettedDate) + && Objects.equals(this.status, numbersBrandVet.status) + && Objects.equals(this.type, numbersBrandVet.type) + && Objects.equals(this.imported, numbersBrandVet.imported) + && Objects.equals(this.importedVetProvider, numbersBrandVet.importedVetProvider); + } + + @Override + public int hashCode() { + return Objects.hash( + vetId, brandId, score, vettedDate, enhancedVettedDate, status, type, imported, importedVetProvider); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandVet {") + .append(newLine) + .append(" vetId: ") + .append(toIndentedString(vetId)) + .append(newLine) + .append(" brandId: ") + .append(toIndentedString(brandId)) + .append(newLine) + .append(" score: ") + .append(toIndentedString(score)) + .append(newLine) + .append(" vettedDate: ") + .append(toIndentedString(vettedDate)) + .append(newLine) + .append(" enhancedVettedDate: ") + .append(toIndentedString(enhancedVettedDate)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" imported: ") + .append(toIndentedString(imported)) + .append(newLine) + .append(" importedVetProvider: ") + .append(toIndentedString(importedVetProvider)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandVetStatus.java b/src/main/java/com/infobip/model/NumbersBrandVetStatus.java new file mode 100644 index 0000000..229884a --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandVetStatus.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The status of vet. + */ +public enum NumbersBrandVetStatus { + PENDING("PENDING"), + SUCCESS("SUCCESS"), + FAILURE("FAILURE"); + + private final String value; + + NumbersBrandVetStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersBrandVetStatus fromValue(String value) { + for (NumbersBrandVetStatus enumElement : NumbersBrandVetStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookContent.java b/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookContent.java new file mode 100644 index 0000000..f8cd17e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookContent.java @@ -0,0 +1,268 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; +import java.util.UUID; + +/** + * Event content. + */ +public class NumbersBrandVetStatusWebhookContent { + + private UUID vetId; + + private UUID brandId; + + private Integer vettingScore; + + private NumbersWebhookBrandVetStatus brandVettingStatus; + + private NumbersWebhookBrandVettingType vetType; + + /** + * Sets vetId. + *

+ * Field description: + * The ID of the brand vet. + * + * @param vetId + * @return This {@link NumbersBrandVetStatusWebhookContent instance}. + */ + public NumbersBrandVetStatusWebhookContent vetId(UUID vetId) { + this.vetId = vetId; + return this; + } + + /** + * Returns vetId. + *

+ * Field description: + * The ID of the brand vet. + * + * @return vetId + */ + @JsonProperty("vetId") + public UUID getVetId() { + return vetId; + } + + /** + * Sets vetId. + *

+ * Field description: + * The ID of the brand vet. + * + * @param vetId + */ + @JsonProperty("vetId") + public void setVetId(UUID vetId) { + this.vetId = vetId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand. + * + * @param brandId + * @return This {@link NumbersBrandVetStatusWebhookContent instance}. + */ + public NumbersBrandVetStatusWebhookContent brandId(UUID brandId) { + this.brandId = brandId; + return this; + } + + /** + * Returns brandId. + *

+ * Field description: + * The ID of the brand. + * + * @return brandId + */ + @JsonProperty("brandId") + public UUID getBrandId() { + return brandId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand. + * + * @param brandId + */ + @JsonProperty("brandId") + public void setBrandId(UUID brandId) { + this.brandId = brandId; + } + + /** + * Sets vettingScore. + *

+ * Field description: + * The vetting score of a brand vet. This can be empty if score isn't present. + * + * @param vettingScore + * @return This {@link NumbersBrandVetStatusWebhookContent instance}. + */ + public NumbersBrandVetStatusWebhookContent vettingScore(Integer vettingScore) { + this.vettingScore = vettingScore; + return this; + } + + /** + * Returns vettingScore. + *

+ * Field description: + * The vetting score of a brand vet. This can be empty if score isn't present. + * + * @return vettingScore + */ + @JsonProperty("vettingScore") + public Integer getVettingScore() { + return vettingScore; + } + + /** + * Sets vettingScore. + *

+ * Field description: + * The vetting score of a brand vet. This can be empty if score isn't present. + * + * @param vettingScore + */ + @JsonProperty("vettingScore") + public void setVettingScore(Integer vettingScore) { + this.vettingScore = vettingScore; + } + + /** + * Sets brandVettingStatus. + * + * @param brandVettingStatus + * @return This {@link NumbersBrandVetStatusWebhookContent instance}. + */ + public NumbersBrandVetStatusWebhookContent brandVettingStatus(NumbersWebhookBrandVetStatus brandVettingStatus) { + this.brandVettingStatus = brandVettingStatus; + return this; + } + + /** + * Returns brandVettingStatus. + * + * @return brandVettingStatus + */ + @JsonProperty("brandVettingStatus") + public NumbersWebhookBrandVetStatus getBrandVettingStatus() { + return brandVettingStatus; + } + + /** + * Sets brandVettingStatus. + * + * @param brandVettingStatus + */ + @JsonProperty("brandVettingStatus") + public void setBrandVettingStatus(NumbersWebhookBrandVetStatus brandVettingStatus) { + this.brandVettingStatus = brandVettingStatus; + } + + /** + * Sets vetType. + * + * @param vetType + * @return This {@link NumbersBrandVetStatusWebhookContent instance}. + */ + public NumbersBrandVetStatusWebhookContent vetType(NumbersWebhookBrandVettingType vetType) { + this.vetType = vetType; + return this; + } + + /** + * Returns vetType. + * + * @return vetType + */ + @JsonProperty("vetType") + public NumbersWebhookBrandVettingType getVetType() { + return vetType; + } + + /** + * Sets vetType. + * + * @param vetType + */ + @JsonProperty("vetType") + public void setVetType(NumbersWebhookBrandVettingType vetType) { + this.vetType = vetType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandVetStatusWebhookContent numbersBrandVetStatusWebhookContent = + (NumbersBrandVetStatusWebhookContent) o; + return Objects.equals(this.vetId, numbersBrandVetStatusWebhookContent.vetId) + && Objects.equals(this.brandId, numbersBrandVetStatusWebhookContent.brandId) + && Objects.equals(this.vettingScore, numbersBrandVetStatusWebhookContent.vettingScore) + && Objects.equals(this.brandVettingStatus, numbersBrandVetStatusWebhookContent.brandVettingStatus) + && Objects.equals(this.vetType, numbersBrandVetStatusWebhookContent.vetType); + } + + @Override + public int hashCode() { + return Objects.hash(vetId, brandId, vettingScore, brandVettingStatus, vetType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandVetStatusWebhookContent {") + .append(newLine) + .append(" vetId: ") + .append(toIndentedString(vetId)) + .append(newLine) + .append(" brandId: ") + .append(toIndentedString(brandId)) + .append(newLine) + .append(" vettingScore: ") + .append(toIndentedString(vettingScore)) + .append(newLine) + .append(" brandVettingStatus: ") + .append(toIndentedString(brandVettingStatus)) + .append(newLine) + .append(" vetType: ") + .append(toIndentedString(vetType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookMessage.java b/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookMessage.java new file mode 100644 index 0000000..1dfae81 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookMessage.java @@ -0,0 +1,256 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Incoming events + */ +public class NumbersBrandVetStatusWebhookMessage { + /** + * The name of the event. + */ + public enum EventEnum { + BRAND_VET_UPDATE("BRAND_VET_UPDATE"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventEnum fromValue(String value) { + for (EventEnum enumElement : EventEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private EventEnum event; + + private OffsetDateTime receivedAt; + + private NumbersBrandVetStatusWebhookContent content; + + private NumbersBrandWebhookPlatform platform; + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + * @return This {@link NumbersBrandVetStatusWebhookMessage instance}. + */ + public NumbersBrandVetStatusWebhookMessage event(EventEnum event) { + this.event = event; + return this; + } + + /** + * Returns event. + *

+ * Field description: + * The name of the event. + * + * @return event + */ + @JsonProperty("event") + public EventEnum getEvent() { + return event; + } + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + */ + @JsonProperty("event") + public void setEvent(EventEnum event) { + this.event = event; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + * @return This {@link NumbersBrandVetStatusWebhookMessage instance}. + */ + public NumbersBrandVetStatusWebhookMessage receivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + return this; + } + + /** + * Returns receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @return receivedAt + */ + @JsonProperty("receivedAt") + public OffsetDateTime getReceivedAt() { + return receivedAt; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + */ + @JsonProperty("receivedAt") + public void setReceivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + } + + /** + * Sets content. + * + * @param content + * @return This {@link NumbersBrandVetStatusWebhookMessage instance}. + */ + public NumbersBrandVetStatusWebhookMessage content(NumbersBrandVetStatusWebhookContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + * + * @return content + */ + @JsonProperty("content") + public NumbersBrandVetStatusWebhookContent getContent() { + return content; + } + + /** + * Sets content. + * + * @param content + */ + @JsonProperty("content") + public void setContent(NumbersBrandVetStatusWebhookContent content) { + this.content = content; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link NumbersBrandVetStatusWebhookMessage instance}. + */ + public NumbersBrandVetStatusWebhookMessage platform(NumbersBrandWebhookPlatform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public NumbersBrandWebhookPlatform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(NumbersBrandWebhookPlatform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandVetStatusWebhookMessage numbersBrandVetStatusWebhookMessage = + (NumbersBrandVetStatusWebhookMessage) o; + return Objects.equals(this.event, numbersBrandVetStatusWebhookMessage.event) + && Objects.equals(this.receivedAt, numbersBrandVetStatusWebhookMessage.receivedAt) + && Objects.equals(this.content, numbersBrandVetStatusWebhookMessage.content) + && Objects.equals(this.platform, numbersBrandVetStatusWebhookMessage.platform); + } + + @Override + public int hashCode() { + return Objects.hash(event, receivedAt, content, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandVetStatusWebhookMessage {") + .append(newLine) + .append(" event: ") + .append(toIndentedString(event)) + .append(newLine) + .append(" receivedAt: ") + .append(toIndentedString(receivedAt)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookResponse.java b/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookResponse.java new file mode 100644 index 0000000..88d7d16 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandVetStatusWebhookResponse.java @@ -0,0 +1,120 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersBrandVetStatusWebhookResponse model. + */ +public class NumbersBrandVetStatusWebhookResponse { + + private List results = null; + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + * @return This {@link NumbersBrandVetStatusWebhookResponse instance}. + */ + public NumbersBrandVetStatusWebhookResponse results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * Incoming events + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersBrandVetStatusWebhookResponse instance}. + */ + public NumbersBrandVetStatusWebhookResponse addResultsItem(NumbersBrandVetStatusWebhookMessage resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * Incoming events + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandVetStatusWebhookResponse numbersBrandVetStatusWebhookResponse = + (NumbersBrandVetStatusWebhookResponse) o; + return Objects.equals(this.results, numbersBrandVetStatusWebhookResponse.results); + } + + @Override + public int hashCode() { + return Objects.hash(results); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandVetStatusWebhookResponse {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBrandWebhookPlatform.java b/src/main/java/com/infobip/model/NumbersBrandWebhookPlatform.java new file mode 100644 index 0000000..f7622fa --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBrandWebhookPlatform.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Platform properties. + */ +public class NumbersBrandWebhookPlatform { + + private String applicationId; + + private String entityId; + + /** + * Sets applicationId. + *

+ * Field description: + * Brand application id. + * + * @param applicationId + * @return This {@link NumbersBrandWebhookPlatform instance}. + */ + public NumbersBrandWebhookPlatform applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * Brand application id. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Brand application id. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Brand entity id. + * + * @param entityId + * @return This {@link NumbersBrandWebhookPlatform instance}. + */ + public NumbersBrandWebhookPlatform entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * Brand entity id. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Brand entity id. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBrandWebhookPlatform numbersBrandWebhookPlatform = (NumbersBrandWebhookPlatform) o; + return Objects.equals(this.applicationId, numbersBrandWebhookPlatform.applicationId) + && Objects.equals(this.entityId, numbersBrandWebhookPlatform.entityId); + } + + @Override + public int hashCode() { + return Objects.hash(applicationId, entityId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBrandWebhookPlatform {") + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBusinessIdentifier.java b/src/main/java/com/infobip/model/NumbersBusinessIdentifier.java new file mode 100644 index 0000000..a132d9e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBusinessIdentifier.java @@ -0,0 +1,126 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * An alternative business identifier for the brand. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = NumbersDataUniversalNumberingSystemNumber.class, name = "DUNS"), + @JsonSubTypes.Type(value = NumbersGlobalIntermediaryIdentificationNumber.class, name = "GIIN"), + @JsonSubTypes.Type(value = NumbersLegalEntityIdentifier.class, name = "LEI"), +}) +public abstract class NumbersBusinessIdentifier { + + private String id; + + protected final NumbersBusinessIdentifierType type; + + /** + * Constructs a new {@link NumbersBusinessIdentifier} instance. + */ + public NumbersBusinessIdentifier(String type) { + this.type = NumbersBusinessIdentifierType.fromValue(type); + } + + /** + * Sets id. + * + * @param id + * @return This {@link NumbersBusinessIdentifier instance}. + */ + public NumbersBusinessIdentifier id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public NumbersBusinessIdentifierType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersBusinessIdentifier numbersBusinessIdentifier = (NumbersBusinessIdentifier) o; + return Objects.equals(this.id, numbersBusinessIdentifier.id) + && Objects.equals(this.type, numbersBusinessIdentifier.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersBusinessIdentifier {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBusinessIdentifierType.java b/src/main/java/com/infobip/model/NumbersBusinessIdentifierType.java new file mode 100644 index 0000000..bc88510 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBusinessIdentifierType.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersBusinessIdentifierType enumeration. + */ +public enum NumbersBusinessIdentifierType { + DUNS("DUNS"), + GIIN("GIIN"), + LEI("LEI"); + + private final String value; + + NumbersBusinessIdentifierType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersBusinessIdentifierType fromValue(String value) { + for (NumbersBusinessIdentifierType enumElement : NumbersBusinessIdentifierType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersBusinessRegistrationType.java b/src/main/java/com/infobip/model/NumbersBusinessRegistrationType.java new file mode 100644 index 0000000..a0fa6e3 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersBusinessRegistrationType.java @@ -0,0 +1,63 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of tax identification number provided. Value depend on selected taxId issuing country. For US it can be only EIN. + */ +public enum NumbersBusinessRegistrationType { + EIN("EIN"), + CBN("CBN"), + NEQ("NEQ"), + PROVINCIAL_NUMBER("PROVINCIAL_NUMBER"), + CRN("CRN"), + VAT("VAT"), + ACN("ACN"), + ABN("ABN"), + BRN("BRN"), + SIREN("SIREN"), + SIRET("SIRET"), + NZBN("NZBN"), + UST_IDNR("UST_IDNR"), + CIF("CIF"), + NIF("NIF"), + CNPJ("CNPJ"), + UID("UID"), + OTHER("OTHER"); + + private final String value; + + NumbersBusinessRegistrationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersBusinessRegistrationType fromValue(String value) { + for (NumbersBusinessRegistrationType enumElement : NumbersBusinessRegistrationType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaign.java b/src/main/java/com/infobip/model/NumbersCampaign.java new file mode 100644 index 0000000..4bacddd --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaign.java @@ -0,0 +1,541 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents NumbersCampaign model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = NumbersExternalTenDlcCampaign.class, name = "EXTERNAL_TEN_DIGIT_LONG_CODE"), + @JsonSubTypes.Type(value = NumbersTenDlcCampaign.class, name = "TEN_DIGIT_LONG_CODE"), + @JsonSubTypes.Type(value = NumbersTollFreeCampaign.class, name = "TOLL_FREE_NUMBER"), +}) +public abstract class NumbersCampaign { + + private UUID id; + + private String referenceId; + + private String applicationId; + + private String entityId; + + private String name; + + private OffsetDateTime createdDate; + + private OffsetDateTime lastModifiedDate; + + private NumbersCampaignStage stage; + + private NumbersPriorityInfo priority; + + private NumbersCampaignFeedback campaignFeedback; + + protected final NumbersCampaignType type; + + /** + * Constructs a new {@link NumbersCampaign} instance. + */ + public NumbersCampaign(String type) { + this.type = NumbersCampaignType.fromValue(type); + } + + /** + * Sets id. + *

+ * Field description: + * The identifier for the campaign. + * + * @param id + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign id(UUID id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The identifier for the campaign. + * + * @return id + */ + @JsonProperty("id") + public UUID getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The identifier for the campaign. + * + * @param id + */ + @JsonProperty("id") + public void setId(UUID id) { + this.id = id; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the campaign. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a campaign is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Returns referenceId. + *

+ * Field description: + * Unique user defined ID for the campaign. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a campaign is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @return referenceId + */ + @JsonProperty("referenceId") + public String getReferenceId() { + return referenceId; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the campaign. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a campaign is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + */ + @JsonProperty("referenceId") + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @param applicationId + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @param entityId + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * Sets name. + *

+ * Field description: + * The name of the campaign. + *

+ * The field is required. + * + * @param name + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * The name of the campaign. + *

+ * The field is required. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * The name of the campaign. + *

+ * The field is required. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets createdDate. + *

+ * Field description: + * The date and time when the campaign was created. + * + * @param createdDate + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign createdDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Returns createdDate. + *

+ * Field description: + * The date and time when the campaign was created. + * + * @return createdDate + */ + @JsonProperty("createdDate") + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + /** + * Sets createdDate. + *

+ * Field description: + * The date and time when the campaign was created. + * + * @param createdDate + */ + @JsonProperty("createdDate") + public void setCreatedDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + /** + * Sets lastModifiedDate. + *

+ * Field description: + * The date and time when the campaign was last modified. + * + * @param lastModifiedDate + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign lastModifiedDate(OffsetDateTime lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + return this; + } + + /** + * Returns lastModifiedDate. + *

+ * Field description: + * The date and time when the campaign was last modified. + * + * @return lastModifiedDate + */ + @JsonProperty("lastModifiedDate") + public OffsetDateTime getLastModifiedDate() { + return lastModifiedDate; + } + + /** + * Sets lastModifiedDate. + *

+ * Field description: + * The date and time when the campaign was last modified. + * + * @param lastModifiedDate + */ + @JsonProperty("lastModifiedDate") + public void setLastModifiedDate(OffsetDateTime lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } + + /** + * Sets stage. + * + * @param stage + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign stage(NumbersCampaignStage stage) { + this.stage = stage; + return this; + } + + /** + * Returns stage. + * + * @return stage + */ + @JsonProperty("stage") + public NumbersCampaignStage getStage() { + return stage; + } + + /** + * Sets stage. + * + * @param stage + */ + @JsonProperty("stage") + public void setStage(NumbersCampaignStage stage) { + this.stage = stage; + } + + /** + * Sets priority. + * + * @param priority + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign priority(NumbersPriorityInfo priority) { + this.priority = priority; + return this; + } + + /** + * Returns priority. + * + * @return priority + */ + @JsonProperty("priority") + public NumbersPriorityInfo getPriority() { + return priority; + } + + /** + * Sets priority. + * + * @param priority + */ + @JsonProperty("priority") + public void setPriority(NumbersPriorityInfo priority) { + this.priority = priority; + } + + /** + * Sets campaignFeedback. + * + * @param campaignFeedback + * @return This {@link NumbersCampaign instance}. + */ + public NumbersCampaign campaignFeedback(NumbersCampaignFeedback campaignFeedback) { + this.campaignFeedback = campaignFeedback; + return this; + } + + /** + * Returns campaignFeedback. + * + * @return campaignFeedback + */ + @JsonProperty("campaignFeedback") + public NumbersCampaignFeedback getCampaignFeedback() { + return campaignFeedback; + } + + /** + * Sets campaignFeedback. + * + * @param campaignFeedback + */ + @JsonProperty("campaignFeedback") + public void setCampaignFeedback(NumbersCampaignFeedback campaignFeedback) { + this.campaignFeedback = campaignFeedback; + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public NumbersCampaignType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaign numbersCampaign = (NumbersCampaign) o; + return Objects.equals(this.id, numbersCampaign.id) + && Objects.equals(this.referenceId, numbersCampaign.referenceId) + && Objects.equals(this.applicationId, numbersCampaign.applicationId) + && Objects.equals(this.entityId, numbersCampaign.entityId) + && Objects.equals(this.name, numbersCampaign.name) + && Objects.equals(this.createdDate, numbersCampaign.createdDate) + && Objects.equals(this.lastModifiedDate, numbersCampaign.lastModifiedDate) + && Objects.equals(this.stage, numbersCampaign.stage) + && Objects.equals(this.priority, numbersCampaign.priority) + && Objects.equals(this.campaignFeedback, numbersCampaign.campaignFeedback) + && Objects.equals(this.type, numbersCampaign.type); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + referenceId, + applicationId, + entityId, + name, + createdDate, + lastModifiedDate, + stage, + priority, + campaignFeedback, + type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaign {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" referenceId: ") + .append(toIndentedString(referenceId)) + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" createdDate: ") + .append(toIndentedString(createdDate)) + .append(newLine) + .append(" lastModifiedDate: ") + .append(toIndentedString(lastModifiedDate)) + .append(newLine) + .append(" stage: ") + .append(toIndentedString(stage)) + .append(newLine) + .append(" priority: ") + .append(toIndentedString(priority)) + .append(newLine) + .append(" campaignFeedback: ") + .append(toIndentedString(campaignFeedback)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookContent.java b/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookContent.java new file mode 100644 index 0000000..c2535a0 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookContent.java @@ -0,0 +1,104 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; +import java.util.UUID; + +/** + * Event content. + */ +public class NumbersCampaignAiFeedbackWebhookContent { + + private UUID aiCampaignFeedbackRequestUuid; + + /** + * Sets aiCampaignFeedbackRequestUuid. + *

+ * Field description: + * Unique identifier of the AI review request, matching the requestUuid returned when the campaign was submitted for AI review. + * + * @param aiCampaignFeedbackRequestUuid + * @return This {@link NumbersCampaignAiFeedbackWebhookContent instance}. + */ + public NumbersCampaignAiFeedbackWebhookContent aiCampaignFeedbackRequestUuid(UUID aiCampaignFeedbackRequestUuid) { + this.aiCampaignFeedbackRequestUuid = aiCampaignFeedbackRequestUuid; + return this; + } + + /** + * Returns aiCampaignFeedbackRequestUuid. + *

+ * Field description: + * Unique identifier of the AI review request, matching the requestUuid returned when the campaign was submitted for AI review. + * + * @return aiCampaignFeedbackRequestUuid + */ + @JsonProperty("aiCampaignFeedbackRequestUuid") + public UUID getAiCampaignFeedbackRequestUuid() { + return aiCampaignFeedbackRequestUuid; + } + + /** + * Sets aiCampaignFeedbackRequestUuid. + *

+ * Field description: + * Unique identifier of the AI review request, matching the requestUuid returned when the campaign was submitted for AI review. + * + * @param aiCampaignFeedbackRequestUuid + */ + @JsonProperty("aiCampaignFeedbackRequestUuid") + public void setAiCampaignFeedbackRequestUuid(UUID aiCampaignFeedbackRequestUuid) { + this.aiCampaignFeedbackRequestUuid = aiCampaignFeedbackRequestUuid; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignAiFeedbackWebhookContent numbersCampaignAiFeedbackWebhookContent = + (NumbersCampaignAiFeedbackWebhookContent) o; + return Objects.equals( + this.aiCampaignFeedbackRequestUuid, + numbersCampaignAiFeedbackWebhookContent.aiCampaignFeedbackRequestUuid); + } + + @Override + public int hashCode() { + return Objects.hash(aiCampaignFeedbackRequestUuid); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignAiFeedbackWebhookContent {") + .append(newLine) + .append(" aiCampaignFeedbackRequestUuid: ") + .append(toIndentedString(aiCampaignFeedbackRequestUuid)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookMessage.java b/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookMessage.java new file mode 100644 index 0000000..38e59d0 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookMessage.java @@ -0,0 +1,256 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Incoming events + */ +public class NumbersCampaignAiFeedbackWebhookMessage { + /** + * The name of the event. + */ + public enum EventEnum { + AI_CAMPAIGN_FEEDBACK("AI_CAMPAIGN_FEEDBACK"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventEnum fromValue(String value) { + for (EventEnum enumElement : EventEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private EventEnum event; + + private OffsetDateTime receivedAt; + + private NumbersCampaignAiFeedbackWebhookContent content; + + private NumbersCampaignWebhookPlatform platform; + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + * @return This {@link NumbersCampaignAiFeedbackWebhookMessage instance}. + */ + public NumbersCampaignAiFeedbackWebhookMessage event(EventEnum event) { + this.event = event; + return this; + } + + /** + * Returns event. + *

+ * Field description: + * The name of the event. + * + * @return event + */ + @JsonProperty("event") + public EventEnum getEvent() { + return event; + } + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + */ + @JsonProperty("event") + public void setEvent(EventEnum event) { + this.event = event; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + * @return This {@link NumbersCampaignAiFeedbackWebhookMessage instance}. + */ + public NumbersCampaignAiFeedbackWebhookMessage receivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + return this; + } + + /** + * Returns receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @return receivedAt + */ + @JsonProperty("receivedAt") + public OffsetDateTime getReceivedAt() { + return receivedAt; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + */ + @JsonProperty("receivedAt") + public void setReceivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + } + + /** + * Sets content. + * + * @param content + * @return This {@link NumbersCampaignAiFeedbackWebhookMessage instance}. + */ + public NumbersCampaignAiFeedbackWebhookMessage content(NumbersCampaignAiFeedbackWebhookContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + * + * @return content + */ + @JsonProperty("content") + public NumbersCampaignAiFeedbackWebhookContent getContent() { + return content; + } + + /** + * Sets content. + * + * @param content + */ + @JsonProperty("content") + public void setContent(NumbersCampaignAiFeedbackWebhookContent content) { + this.content = content; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link NumbersCampaignAiFeedbackWebhookMessage instance}. + */ + public NumbersCampaignAiFeedbackWebhookMessage platform(NumbersCampaignWebhookPlatform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public NumbersCampaignWebhookPlatform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(NumbersCampaignWebhookPlatform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignAiFeedbackWebhookMessage numbersCampaignAiFeedbackWebhookMessage = + (NumbersCampaignAiFeedbackWebhookMessage) o; + return Objects.equals(this.event, numbersCampaignAiFeedbackWebhookMessage.event) + && Objects.equals(this.receivedAt, numbersCampaignAiFeedbackWebhookMessage.receivedAt) + && Objects.equals(this.content, numbersCampaignAiFeedbackWebhookMessage.content) + && Objects.equals(this.platform, numbersCampaignAiFeedbackWebhookMessage.platform); + } + + @Override + public int hashCode() { + return Objects.hash(event, receivedAt, content, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignAiFeedbackWebhookMessage {") + .append(newLine) + .append(" event: ") + .append(toIndentedString(event)) + .append(newLine) + .append(" receivedAt: ") + .append(toIndentedString(receivedAt)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookResponse.java b/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookResponse.java new file mode 100644 index 0000000..8b38ff2 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignAiFeedbackWebhookResponse.java @@ -0,0 +1,121 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersCampaignAiFeedbackWebhookResponse model. + */ +public class NumbersCampaignAiFeedbackWebhookResponse { + + private List results = null; + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + * @return This {@link NumbersCampaignAiFeedbackWebhookResponse instance}. + */ + public NumbersCampaignAiFeedbackWebhookResponse results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * Incoming events + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersCampaignAiFeedbackWebhookResponse instance}. + */ + public NumbersCampaignAiFeedbackWebhookResponse addResultsItem( + NumbersCampaignAiFeedbackWebhookMessage resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * Incoming events + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignAiFeedbackWebhookResponse numbersCampaignAiFeedbackWebhookResponse = + (NumbersCampaignAiFeedbackWebhookResponse) o; + return Objects.equals(this.results, numbersCampaignAiFeedbackWebhookResponse.results); + } + + @Override + public int hashCode() { + return Objects.hash(results); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignAiFeedbackWebhookResponse {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignFeedback.java b/src/main/java/com/infobip/model/NumbersCampaignFeedback.java new file mode 100644 index 0000000..8a87065 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignFeedback.java @@ -0,0 +1,229 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Offers additional information regarding the campaign, includes rejection reason and time. + */ +public class NumbersCampaignFeedback { + + private List rejectionReasons = null; + + private List rejectionDetails = null; + + private OffsetDateTime rejectionDate; + + /** + * Sets rejectionReasons. + *

+ * Field description: + * The reasons for the rejection. + * + * @param rejectionReasons + * @return This {@link NumbersCampaignFeedback instance}. + */ + public NumbersCampaignFeedback rejectionReasons(List rejectionReasons) { + this.rejectionReasons = rejectionReasons; + return this; + } + + /** + * Adds and item into rejectionReasons. + *

+ * Field description: + * The reasons for the rejection. + * + * @param rejectionReasonsItem The item to be added to the list. + * @return This {@link NumbersCampaignFeedback instance}. + */ + public NumbersCampaignFeedback addRejectionReasonsItem(String rejectionReasonsItem) { + if (this.rejectionReasons == null) { + this.rejectionReasons = new ArrayList<>(); + } + this.rejectionReasons.add(rejectionReasonsItem); + return this; + } + + /** + * Returns rejectionReasons. + *

+ * Field description: + * The reasons for the rejection. + * + * @return rejectionReasons + */ + @JsonProperty("rejectionReasons") + public List getRejectionReasons() { + return rejectionReasons; + } + + /** + * Sets rejectionReasons. + *

+ * Field description: + * The reasons for the rejection. + * + * @param rejectionReasons + */ + @JsonProperty("rejectionReasons") + public void setRejectionReasons(List rejectionReasons) { + this.rejectionReasons = rejectionReasons; + } + + /** + * Sets rejectionDetails. + *

+ * Field description: + * Rejection reasons details. + * + * @param rejectionDetails + * @return This {@link NumbersCampaignFeedback instance}. + */ + public NumbersCampaignFeedback rejectionDetails(List rejectionDetails) { + this.rejectionDetails = rejectionDetails; + return this; + } + + /** + * Adds and item into rejectionDetails. + *

+ * Field description: + * Rejection reasons details. + * + * @param rejectionDetailsItem The item to be added to the list. + * @return This {@link NumbersCampaignFeedback instance}. + */ + public NumbersCampaignFeedback addRejectionDetailsItem(NumbersRejectionReason rejectionDetailsItem) { + if (this.rejectionDetails == null) { + this.rejectionDetails = new ArrayList<>(); + } + this.rejectionDetails.add(rejectionDetailsItem); + return this; + } + + /** + * Returns rejectionDetails. + *

+ * Field description: + * Rejection reasons details. + * + * @return rejectionDetails + */ + @JsonProperty("rejectionDetails") + public List getRejectionDetails() { + return rejectionDetails; + } + + /** + * Sets rejectionDetails. + *

+ * Field description: + * Rejection reasons details. + * + * @param rejectionDetails + */ + @JsonProperty("rejectionDetails") + public void setRejectionDetails(List rejectionDetails) { + this.rejectionDetails = rejectionDetails; + } + + /** + * Sets rejectionDate. + *

+ * Field description: + * The time of the rejection. + * + * @param rejectionDate + * @return This {@link NumbersCampaignFeedback instance}. + */ + public NumbersCampaignFeedback rejectionDate(OffsetDateTime rejectionDate) { + this.rejectionDate = rejectionDate; + return this; + } + + /** + * Returns rejectionDate. + *

+ * Field description: + * The time of the rejection. + * + * @return rejectionDate + */ + @JsonProperty("rejectionDate") + public OffsetDateTime getRejectionDate() { + return rejectionDate; + } + + /** + * Sets rejectionDate. + *

+ * Field description: + * The time of the rejection. + * + * @param rejectionDate + */ + @JsonProperty("rejectionDate") + public void setRejectionDate(OffsetDateTime rejectionDate) { + this.rejectionDate = rejectionDate; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignFeedback numbersCampaignFeedback = (NumbersCampaignFeedback) o; + return Objects.equals(this.rejectionReasons, numbersCampaignFeedback.rejectionReasons) + && Objects.equals(this.rejectionDetails, numbersCampaignFeedback.rejectionDetails) + && Objects.equals(this.rejectionDate, numbersCampaignFeedback.rejectionDate); + } + + @Override + public int hashCode() { + return Objects.hash(rejectionReasons, rejectionDetails, rejectionDate); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignFeedback {") + .append(newLine) + .append(" rejectionReasons: ") + .append(toIndentedString(rejectionReasons)) + .append(newLine) + .append(" rejectionDetails: ") + .append(toIndentedString(rejectionDetails)) + .append(newLine) + .append(" rejectionDate: ") + .append(toIndentedString(rejectionDate)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookContent.java b/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookContent.java new file mode 100644 index 0000000..8a693e5 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookContent.java @@ -0,0 +1,178 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; +import java.util.UUID; + +/** + * Event content. + */ +public class NumbersCampaignNetworkStatusWebhookContent { + + private UUID campaignId; + + private NumbersCampaignRegistrar campaignNetwork; + + private NumbersWebhookCampaignNetworkStatus campaignNetworkStatus; + + /** + * Sets campaignId. + *

+ * Field description: + * The ID of campaign. + * + * @param campaignId + * @return This {@link NumbersCampaignNetworkStatusWebhookContent instance}. + */ + public NumbersCampaignNetworkStatusWebhookContent campaignId(UUID campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * Returns campaignId. + *

+ * Field description: + * The ID of campaign. + * + * @return campaignId + */ + @JsonProperty("campaignId") + public UUID getCampaignId() { + return campaignId; + } + + /** + * Sets campaignId. + *

+ * Field description: + * The ID of campaign. + * + * @param campaignId + */ + @JsonProperty("campaignId") + public void setCampaignId(UUID campaignId) { + this.campaignId = campaignId; + } + + /** + * Sets campaignNetwork. + * + * @param campaignNetwork + * @return This {@link NumbersCampaignNetworkStatusWebhookContent instance}. + */ + public NumbersCampaignNetworkStatusWebhookContent campaignNetwork(NumbersCampaignRegistrar campaignNetwork) { + this.campaignNetwork = campaignNetwork; + return this; + } + + /** + * Returns campaignNetwork. + * + * @return campaignNetwork + */ + @JsonProperty("campaignNetwork") + public NumbersCampaignRegistrar getCampaignNetwork() { + return campaignNetwork; + } + + /** + * Sets campaignNetwork. + * + * @param campaignNetwork + */ + @JsonProperty("campaignNetwork") + public void setCampaignNetwork(NumbersCampaignRegistrar campaignNetwork) { + this.campaignNetwork = campaignNetwork; + } + + /** + * Sets campaignNetworkStatus. + * + * @param campaignNetworkStatus + * @return This {@link NumbersCampaignNetworkStatusWebhookContent instance}. + */ + public NumbersCampaignNetworkStatusWebhookContent campaignNetworkStatus( + NumbersWebhookCampaignNetworkStatus campaignNetworkStatus) { + this.campaignNetworkStatus = campaignNetworkStatus; + return this; + } + + /** + * Returns campaignNetworkStatus. + * + * @return campaignNetworkStatus + */ + @JsonProperty("campaignNetworkStatus") + public NumbersWebhookCampaignNetworkStatus getCampaignNetworkStatus() { + return campaignNetworkStatus; + } + + /** + * Sets campaignNetworkStatus. + * + * @param campaignNetworkStatus + */ + @JsonProperty("campaignNetworkStatus") + public void setCampaignNetworkStatus(NumbersWebhookCampaignNetworkStatus campaignNetworkStatus) { + this.campaignNetworkStatus = campaignNetworkStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignNetworkStatusWebhookContent numbersCampaignNetworkStatusWebhookContent = + (NumbersCampaignNetworkStatusWebhookContent) o; + return Objects.equals(this.campaignId, numbersCampaignNetworkStatusWebhookContent.campaignId) + && Objects.equals(this.campaignNetwork, numbersCampaignNetworkStatusWebhookContent.campaignNetwork) + && Objects.equals( + this.campaignNetworkStatus, numbersCampaignNetworkStatusWebhookContent.campaignNetworkStatus); + } + + @Override + public int hashCode() { + return Objects.hash(campaignId, campaignNetwork, campaignNetworkStatus); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignNetworkStatusWebhookContent {") + .append(newLine) + .append(" campaignId: ") + .append(toIndentedString(campaignId)) + .append(newLine) + .append(" campaignNetwork: ") + .append(toIndentedString(campaignNetwork)) + .append(newLine) + .append(" campaignNetworkStatus: ") + .append(toIndentedString(campaignNetworkStatus)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookMessage.java b/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookMessage.java new file mode 100644 index 0000000..ebbdbfe --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookMessage.java @@ -0,0 +1,256 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Incoming events + */ +public class NumbersCampaignNetworkStatusWebhookMessage { + /** + * The name of the event. + */ + public enum EventEnum { + CAMPAIGN_NETWORK_STATUS_UPDATE("CAMPAIGN_NETWORK_STATUS_UPDATE"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventEnum fromValue(String value) { + for (EventEnum enumElement : EventEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private EventEnum event; + + private OffsetDateTime receivedAt; + + private NumbersCampaignNetworkStatusWebhookContent content; + + private NumbersCampaignWebhookPlatform platform; + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + * @return This {@link NumbersCampaignNetworkStatusWebhookMessage instance}. + */ + public NumbersCampaignNetworkStatusWebhookMessage event(EventEnum event) { + this.event = event; + return this; + } + + /** + * Returns event. + *

+ * Field description: + * The name of the event. + * + * @return event + */ + @JsonProperty("event") + public EventEnum getEvent() { + return event; + } + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + */ + @JsonProperty("event") + public void setEvent(EventEnum event) { + this.event = event; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + * @return This {@link NumbersCampaignNetworkStatusWebhookMessage instance}. + */ + public NumbersCampaignNetworkStatusWebhookMessage receivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + return this; + } + + /** + * Returns receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @return receivedAt + */ + @JsonProperty("receivedAt") + public OffsetDateTime getReceivedAt() { + return receivedAt; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + */ + @JsonProperty("receivedAt") + public void setReceivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + } + + /** + * Sets content. + * + * @param content + * @return This {@link NumbersCampaignNetworkStatusWebhookMessage instance}. + */ + public NumbersCampaignNetworkStatusWebhookMessage content(NumbersCampaignNetworkStatusWebhookContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + * + * @return content + */ + @JsonProperty("content") + public NumbersCampaignNetworkStatusWebhookContent getContent() { + return content; + } + + /** + * Sets content. + * + * @param content + */ + @JsonProperty("content") + public void setContent(NumbersCampaignNetworkStatusWebhookContent content) { + this.content = content; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link NumbersCampaignNetworkStatusWebhookMessage instance}. + */ + public NumbersCampaignNetworkStatusWebhookMessage platform(NumbersCampaignWebhookPlatform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public NumbersCampaignWebhookPlatform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(NumbersCampaignWebhookPlatform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignNetworkStatusWebhookMessage numbersCampaignNetworkStatusWebhookMessage = + (NumbersCampaignNetworkStatusWebhookMessage) o; + return Objects.equals(this.event, numbersCampaignNetworkStatusWebhookMessage.event) + && Objects.equals(this.receivedAt, numbersCampaignNetworkStatusWebhookMessage.receivedAt) + && Objects.equals(this.content, numbersCampaignNetworkStatusWebhookMessage.content) + && Objects.equals(this.platform, numbersCampaignNetworkStatusWebhookMessage.platform); + } + + @Override + public int hashCode() { + return Objects.hash(event, receivedAt, content, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignNetworkStatusWebhookMessage {") + .append(newLine) + .append(" event: ") + .append(toIndentedString(event)) + .append(newLine) + .append(" receivedAt: ") + .append(toIndentedString(receivedAt)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookResponse.java b/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookResponse.java new file mode 100644 index 0000000..e75414e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignNetworkStatusWebhookResponse.java @@ -0,0 +1,122 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersCampaignNetworkStatusWebhookResponse model. + */ +public class NumbersCampaignNetworkStatusWebhookResponse { + + private List results = null; + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + * @return This {@link NumbersCampaignNetworkStatusWebhookResponse instance}. + */ + public NumbersCampaignNetworkStatusWebhookResponse results( + List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * Incoming events + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersCampaignNetworkStatusWebhookResponse instance}. + */ + public NumbersCampaignNetworkStatusWebhookResponse addResultsItem( + NumbersCampaignNetworkStatusWebhookMessage resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * Incoming events + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignNetworkStatusWebhookResponse numbersCampaignNetworkStatusWebhookResponse = + (NumbersCampaignNetworkStatusWebhookResponse) o; + return Objects.equals(this.results, numbersCampaignNetworkStatusWebhookResponse.results); + } + + @Override + public int hashCode() { + return Objects.hash(results); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignNetworkStatusWebhookResponse {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignRegistrar.java b/src/main/java/com/infobip/model/NumbersCampaignRegistrar.java new file mode 100644 index 0000000..f5f77a3 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignRegistrar.java @@ -0,0 +1,55 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The network a campaign is submitted to. + */ +public enum NumbersCampaignRegistrar { + CAMPAIGN_REGISTRY("CAMPAIGN_REGISTRY"), + T_MOBILE("T_MOBILE"), + ATT("ATT"), + VERIZON("VERIZON"), + CLEARSKY("CLEARSKY"), + US_CELLULAR_SMS("US_CELLULAR_SMS"), + INTEROP("INTEROP"), + GOOGLE_VOICE("GOOGLE_VOICE"), + US_CELLULAR_MMS("US_CELLULAR_MMS"), + ZIPWHIP("ZIPWHIP"); + + private final String value; + + NumbersCampaignRegistrar(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersCampaignRegistrar fromValue(String value) { + for (NumbersCampaignRegistrar enumElement : NumbersCampaignRegistrar.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignStage.java b/src/main/java/com/infobip/model/NumbersCampaignStage.java new file mode 100644 index 0000000..f3466cc --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignStage.java @@ -0,0 +1,64 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersCampaignStage enumeration. + */ +public enum NumbersCampaignStage { + DRAFT("DRAFT"), + SUBMITTED_FOR_REVIEW("SUBMITTED_FOR_REVIEW"), + IN_REVIEW("IN_REVIEW"), + UPDATE_REQUESTED_BY_INTERNAL_REVIEWER("UPDATE_REQUESTED_BY_INTERNAL_REVIEWER"), + APPROVED_BY_INTERNAL_REVIEWER("APPROVED_BY_INTERNAL_REVIEWER"), + SUBMITTED("SUBMITTED"), + UPDATE_REQUESTED_BY_CARRIERS("UPDATE_REQUESTED_BY_CARRIERS"), + REGISTERED("REGISTERED"), + REJECTED("REJECTED"), + ON_HOLD("ON_HOLD"), + DEREGISTERED("DEREGISTERED"), + REGISTERED_PENDING_UPDATE("REGISTERED_PENDING_UPDATE"), + REGISTERED_PENDING_DEREGISTRATION("REGISTERED_PENDING_DEREGISTRATION"), + ARCHIVED("ARCHIVED"), + BLOCKED("BLOCKED"), + SUSPENDED("SUSPENDED"), + APPEALED("APPEALED"), + IN_MIGRATION("IN_MIGRATION"), + PAUSED("PAUSED"); + + private final String value; + + NumbersCampaignStage(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersCampaignStage fromValue(String value) { + for (NumbersCampaignStage enumElement : NumbersCampaignStage.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookContent.java b/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookContent.java new file mode 100644 index 0000000..b107273 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookContent.java @@ -0,0 +1,298 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Event content. + */ +public class NumbersCampaignStatusWebhookContent { + + private UUID campaignId; + + private NumbersWebhookCampaignStage campaignStatus; + + private String rejectionReasons; + + private List rejectionDetails = null; + + private OffsetDateTime rejectionDate; + + /** + * Sets campaignId. + *

+ * Field description: + * The ID of campaign. + * + * @param campaignId + * @return This {@link NumbersCampaignStatusWebhookContent instance}. + */ + public NumbersCampaignStatusWebhookContent campaignId(UUID campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * Returns campaignId. + *

+ * Field description: + * The ID of campaign. + * + * @return campaignId + */ + @JsonProperty("campaignId") + public UUID getCampaignId() { + return campaignId; + } + + /** + * Sets campaignId. + *

+ * Field description: + * The ID of campaign. + * + * @param campaignId + */ + @JsonProperty("campaignId") + public void setCampaignId(UUID campaignId) { + this.campaignId = campaignId; + } + + /** + * Sets campaignStatus. + * + * @param campaignStatus + * @return This {@link NumbersCampaignStatusWebhookContent instance}. + */ + public NumbersCampaignStatusWebhookContent campaignStatus(NumbersWebhookCampaignStage campaignStatus) { + this.campaignStatus = campaignStatus; + return this; + } + + /** + * Returns campaignStatus. + * + * @return campaignStatus + */ + @JsonProperty("campaignStatus") + public NumbersWebhookCampaignStage getCampaignStatus() { + return campaignStatus; + } + + /** + * Sets campaignStatus. + * + * @param campaignStatus + */ + @JsonProperty("campaignStatus") + public void setCampaignStatus(NumbersWebhookCampaignStage campaignStatus) { + this.campaignStatus = campaignStatus; + } + + /** + * Sets rejectionReasons. + *

+ * Field description: + * The rejection reasons. This field is present only when new campaign registration status is 'REJECTED'. + * + * @param rejectionReasons + * @return This {@link NumbersCampaignStatusWebhookContent instance}. + */ + public NumbersCampaignStatusWebhookContent rejectionReasons(String rejectionReasons) { + this.rejectionReasons = rejectionReasons; + return this; + } + + /** + * Returns rejectionReasons. + *

+ * Field description: + * The rejection reasons. This field is present only when new campaign registration status is 'REJECTED'. + * + * @return rejectionReasons + */ + @JsonProperty("rejectionReasons") + public String getRejectionReasons() { + return rejectionReasons; + } + + /** + * Sets rejectionReasons. + *

+ * Field description: + * The rejection reasons. This field is present only when new campaign registration status is 'REJECTED'. + * + * @param rejectionReasons + */ + @JsonProperty("rejectionReasons") + public void setRejectionReasons(String rejectionReasons) { + this.rejectionReasons = rejectionReasons; + } + + /** + * Sets rejectionDetails. + *

+ * Field description: + * The rejection reasons details. This field is present only when new campaign registration status is 'REJECTED'. + * + * @param rejectionDetails + * @return This {@link NumbersCampaignStatusWebhookContent instance}. + */ + public NumbersCampaignStatusWebhookContent rejectionDetails(List rejectionDetails) { + this.rejectionDetails = rejectionDetails; + return this; + } + + /** + * Adds and item into rejectionDetails. + *

+ * Field description: + * The rejection reasons details. This field is present only when new campaign registration status is 'REJECTED'. + * + * @param rejectionDetailsItem The item to be added to the list. + * @return This {@link NumbersCampaignStatusWebhookContent instance}. + */ + public NumbersCampaignStatusWebhookContent addRejectionDetailsItem( + NumbersRejectionReasonPayload rejectionDetailsItem) { + if (this.rejectionDetails == null) { + this.rejectionDetails = new ArrayList<>(); + } + this.rejectionDetails.add(rejectionDetailsItem); + return this; + } + + /** + * Returns rejectionDetails. + *

+ * Field description: + * The rejection reasons details. This field is present only when new campaign registration status is 'REJECTED'. + * + * @return rejectionDetails + */ + @JsonProperty("rejectionDetails") + public List getRejectionDetails() { + return rejectionDetails; + } + + /** + * Sets rejectionDetails. + *

+ * Field description: + * The rejection reasons details. This field is present only when new campaign registration status is 'REJECTED'. + * + * @param rejectionDetails + */ + @JsonProperty("rejectionDetails") + public void setRejectionDetails(List rejectionDetails) { + this.rejectionDetails = rejectionDetails; + } + + /** + * Sets rejectionDate. + *

+ * Field description: + * The rejection date. This field is present only when new campaign registration status is 'REJECTED'. + * + * @param rejectionDate + * @return This {@link NumbersCampaignStatusWebhookContent instance}. + */ + public NumbersCampaignStatusWebhookContent rejectionDate(OffsetDateTime rejectionDate) { + this.rejectionDate = rejectionDate; + return this; + } + + /** + * Returns rejectionDate. + *

+ * Field description: + * The rejection date. This field is present only when new campaign registration status is 'REJECTED'. + * + * @return rejectionDate + */ + @JsonProperty("rejectionDate") + public OffsetDateTime getRejectionDate() { + return rejectionDate; + } + + /** + * Sets rejectionDate. + *

+ * Field description: + * The rejection date. This field is present only when new campaign registration status is 'REJECTED'. + * + * @param rejectionDate + */ + @JsonProperty("rejectionDate") + public void setRejectionDate(OffsetDateTime rejectionDate) { + this.rejectionDate = rejectionDate; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignStatusWebhookContent numbersCampaignStatusWebhookContent = + (NumbersCampaignStatusWebhookContent) o; + return Objects.equals(this.campaignId, numbersCampaignStatusWebhookContent.campaignId) + && Objects.equals(this.campaignStatus, numbersCampaignStatusWebhookContent.campaignStatus) + && Objects.equals(this.rejectionReasons, numbersCampaignStatusWebhookContent.rejectionReasons) + && Objects.equals(this.rejectionDetails, numbersCampaignStatusWebhookContent.rejectionDetails) + && Objects.equals(this.rejectionDate, numbersCampaignStatusWebhookContent.rejectionDate); + } + + @Override + public int hashCode() { + return Objects.hash(campaignId, campaignStatus, rejectionReasons, rejectionDetails, rejectionDate); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignStatusWebhookContent {") + .append(newLine) + .append(" campaignId: ") + .append(toIndentedString(campaignId)) + .append(newLine) + .append(" campaignStatus: ") + .append(toIndentedString(campaignStatus)) + .append(newLine) + .append(" rejectionReasons: ") + .append(toIndentedString(rejectionReasons)) + .append(newLine) + .append(" rejectionDetails: ") + .append(toIndentedString(rejectionDetails)) + .append(newLine) + .append(" rejectionDate: ") + .append(toIndentedString(rejectionDate)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookMessage.java b/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookMessage.java new file mode 100644 index 0000000..fc42039 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookMessage.java @@ -0,0 +1,256 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Incoming events + */ +public class NumbersCampaignStatusWebhookMessage { + /** + * The name of the event. + */ + public enum EventEnum { + CAMPAIGN_STATUS_UPDATE("CAMPAIGN_STATUS_UPDATE"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventEnum fromValue(String value) { + for (EventEnum enumElement : EventEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private EventEnum event; + + private OffsetDateTime receivedAt; + + private NumbersCampaignStatusWebhookContent content; + + private NumbersCampaignWebhookPlatform platform; + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + * @return This {@link NumbersCampaignStatusWebhookMessage instance}. + */ + public NumbersCampaignStatusWebhookMessage event(EventEnum event) { + this.event = event; + return this; + } + + /** + * Returns event. + *

+ * Field description: + * The name of the event. + * + * @return event + */ + @JsonProperty("event") + public EventEnum getEvent() { + return event; + } + + /** + * Sets event. + *

+ * Field description: + * The name of the event. + * + * @param event + */ + @JsonProperty("event") + public void setEvent(EventEnum event) { + this.event = event; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + * @return This {@link NumbersCampaignStatusWebhookMessage instance}. + */ + public NumbersCampaignStatusWebhookMessage receivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + return this; + } + + /** + * Returns receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @return receivedAt + */ + @JsonProperty("receivedAt") + public OffsetDateTime getReceivedAt() { + return receivedAt; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when Infobip received the event. + * + * @param receivedAt + */ + @JsonProperty("receivedAt") + public void setReceivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + } + + /** + * Sets content. + * + * @param content + * @return This {@link NumbersCampaignStatusWebhookMessage instance}. + */ + public NumbersCampaignStatusWebhookMessage content(NumbersCampaignStatusWebhookContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + * + * @return content + */ + @JsonProperty("content") + public NumbersCampaignStatusWebhookContent getContent() { + return content; + } + + /** + * Sets content. + * + * @param content + */ + @JsonProperty("content") + public void setContent(NumbersCampaignStatusWebhookContent content) { + this.content = content; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link NumbersCampaignStatusWebhookMessage instance}. + */ + public NumbersCampaignStatusWebhookMessage platform(NumbersCampaignWebhookPlatform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public NumbersCampaignWebhookPlatform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(NumbersCampaignWebhookPlatform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignStatusWebhookMessage numbersCampaignStatusWebhookMessage = + (NumbersCampaignStatusWebhookMessage) o; + return Objects.equals(this.event, numbersCampaignStatusWebhookMessage.event) + && Objects.equals(this.receivedAt, numbersCampaignStatusWebhookMessage.receivedAt) + && Objects.equals(this.content, numbersCampaignStatusWebhookMessage.content) + && Objects.equals(this.platform, numbersCampaignStatusWebhookMessage.platform); + } + + @Override + public int hashCode() { + return Objects.hash(event, receivedAt, content, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignStatusWebhookMessage {") + .append(newLine) + .append(" event: ") + .append(toIndentedString(event)) + .append(newLine) + .append(" receivedAt: ") + .append(toIndentedString(receivedAt)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookResponse.java b/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookResponse.java new file mode 100644 index 0000000..0f4e83e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignStatusWebhookResponse.java @@ -0,0 +1,120 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersCampaignStatusWebhookResponse model. + */ +public class NumbersCampaignStatusWebhookResponse { + + private List results = null; + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + * @return This {@link NumbersCampaignStatusWebhookResponse instance}. + */ + public NumbersCampaignStatusWebhookResponse results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * Incoming events + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersCampaignStatusWebhookResponse instance}. + */ + public NumbersCampaignStatusWebhookResponse addResultsItem(NumbersCampaignStatusWebhookMessage resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * Incoming events + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * Incoming events + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignStatusWebhookResponse numbersCampaignStatusWebhookResponse = + (NumbersCampaignStatusWebhookResponse) o; + return Objects.equals(this.results, numbersCampaignStatusWebhookResponse.results); + } + + @Override + public int hashCode() { + return Objects.hash(results); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignStatusWebhookResponse {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignType.java b/src/main/java/com/infobip/model/NumbersCampaignType.java new file mode 100644 index 0000000..5a93705 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignType.java @@ -0,0 +1,52 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersCampaignType enumeration. + */ +public enum NumbersCampaignType { + TEN_DIGIT_LONG_CODE("TEN_DIGIT_LONG_CODE"), + EXTERNAL_TEN_DIGIT_LONG_CODE("EXTERNAL_TEN_DIGIT_LONG_CODE"), + SHORT_CODE("SHORT_CODE"), + DCA2_TEN_DIGIT_LONG_CODE("DCA2_TEN_DIGIT_LONG_CODE"), + TOLL_FREE_NUMBER("TOLL_FREE_NUMBER"), + TOLL_FREE_UNIFIED_NUMBER("TOLL_FREE_UNIFIED_NUMBER"), + TOLL_FREE_EXTERNALLY_VERIFIED("TOLL_FREE_EXTERNALLY_VERIFIED"); + + private final String value; + + NumbersCampaignType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersCampaignType fromValue(String value) { + for (NumbersCampaignType enumElement : NumbersCampaignType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCampaignWebhookPlatform.java b/src/main/java/com/infobip/model/NumbersCampaignWebhookPlatform.java new file mode 100644 index 0000000..1955c2b --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCampaignWebhookPlatform.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Platform properties. + */ +public class NumbersCampaignWebhookPlatform { + + private String applicationId; + + private String entityId; + + /** + * Sets applicationId. + *

+ * Field description: + * Campaign application id. + * + * @param applicationId + * @return This {@link NumbersCampaignWebhookPlatform instance}. + */ + public NumbersCampaignWebhookPlatform applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * Campaign application id. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Campaign application id. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Campaign entity id. + * + * @param entityId + * @return This {@link NumbersCampaignWebhookPlatform instance}. + */ + public NumbersCampaignWebhookPlatform entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * Campaign entity id. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Campaign entity id. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCampaignWebhookPlatform numbersCampaignWebhookPlatform = (NumbersCampaignWebhookPlatform) o; + return Objects.equals(this.applicationId, numbersCampaignWebhookPlatform.applicationId) + && Objects.equals(this.entityId, numbersCampaignWebhookPlatform.entityId); + } + + @Override + public int hashCode() { + return Objects.hash(applicationId, entityId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCampaignWebhookPlatform {") + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersCvVetImportRequest.java b/src/main/java/com/infobip/model/NumbersCvVetImportRequest.java new file mode 100644 index 0000000..6ad3d2d --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersCvVetImportRequest.java @@ -0,0 +1,116 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersCvVetImportRequest model. + */ +public class NumbersCvVetImportRequest extends NumbersVetImportRequest { + + private String authorizationToken; + + /** + * Constructs a new {@link NumbersCvVetImportRequest} instance. + */ + public NumbersCvVetImportRequest() { + super("CAMPAIGN_VERIFY"); + } + + /** + * Sets authorizationToken. + *

+ * Field description: + * Campaign Verify authorization token + *

+ * The field is required. + * + * @param authorizationToken + * @return This {@link NumbersCvVetImportRequest instance}. + */ + public NumbersCvVetImportRequest authorizationToken(String authorizationToken) { + this.authorizationToken = authorizationToken; + return this; + } + + /** + * Returns authorizationToken. + *

+ * Field description: + * Campaign Verify authorization token + *

+ * The field is required. + * + * @return authorizationToken + */ + @JsonProperty("authorizationToken") + public String getAuthorizationToken() { + return authorizationToken; + } + + /** + * Sets authorizationToken. + *

+ * Field description: + * Campaign Verify authorization token + *

+ * The field is required. + * + * @param authorizationToken + */ + @JsonProperty("authorizationToken") + public void setAuthorizationToken(String authorizationToken) { + this.authorizationToken = authorizationToken; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersCvVetImportRequest numbersCvVetImportRequest = (NumbersCvVetImportRequest) o; + return Objects.equals(this.authorizationToken, numbersCvVetImportRequest.authorizationToken) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(authorizationToken, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersCvVetImportRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" authorizationToken: ") + .append(toIndentedString(authorizationToken)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersDataUniversalNumberingSystemNumber.java b/src/main/java/com/infobip/model/NumbersDataUniversalNumberingSystemNumber.java new file mode 100644 index 0000000..ec1c6e8 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersDataUniversalNumberingSystemNumber.java @@ -0,0 +1,117 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersDataUniversalNumberingSystemNumber model. + */ +public class NumbersDataUniversalNumberingSystemNumber extends NumbersBusinessIdentifier { + + private String id; + + /** + * Constructs a new {@link NumbersDataUniversalNumberingSystemNumber} instance. + */ + public NumbersDataUniversalNumberingSystemNumber() { + super("DUNS"); + } + + /** + * Sets id. + *

+ * Field description: + * The DUNS identifier. + *

+ * The field is required. + * + * @param id + * @return This {@link NumbersDataUniversalNumberingSystemNumber instance}. + */ + public NumbersDataUniversalNumberingSystemNumber id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The DUNS identifier. + *

+ * The field is required. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The DUNS identifier. + *

+ * The field is required. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersDataUniversalNumberingSystemNumber numbersDataUniversalNumberingSystemNumber = + (NumbersDataUniversalNumberingSystemNumber) o; + return Objects.equals(this.id, numbersDataUniversalNumberingSystemNumber.id) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersDataUniversalNumberingSystemNumber {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersDocumentMetadata.java b/src/main/java/com/infobip/model/NumbersDocumentMetadata.java new file mode 100644 index 0000000..39f6c4a --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersDocumentMetadata.java @@ -0,0 +1,239 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; +import java.util.UUID; + +/** + * Preview of the screenshot document. This property is read-only and ignored in POST/PUT calls. + */ +public class NumbersDocumentMetadata { + + private UUID documentId; + + private String documentName; + + private String contentType; + + private Integer contentLength; + + /** + * Sets documentId. + *

+ * Field description: + * Unique identifier for the document. + * + * @param documentId + * @return This {@link NumbersDocumentMetadata instance}. + */ + public NumbersDocumentMetadata documentId(UUID documentId) { + this.documentId = documentId; + return this; + } + + /** + * Returns documentId. + *

+ * Field description: + * Unique identifier for the document. + * + * @return documentId + */ + @JsonProperty("documentId") + public UUID getDocumentId() { + return documentId; + } + + /** + * Sets documentId. + *

+ * Field description: + * Unique identifier for the document. + * + * @param documentId + */ + @JsonProperty("documentId") + public void setDocumentId(UUID documentId) { + this.documentId = documentId; + } + + /** + * Sets documentName. + *

+ * Field description: + * Name of the document file. + * + * @param documentName + * @return This {@link NumbersDocumentMetadata instance}. + */ + public NumbersDocumentMetadata documentName(String documentName) { + this.documentName = documentName; + return this; + } + + /** + * Returns documentName. + *

+ * Field description: + * Name of the document file. + * + * @return documentName + */ + @JsonProperty("documentName") + public String getDocumentName() { + return documentName; + } + + /** + * Sets documentName. + *

+ * Field description: + * Name of the document file. + * + * @param documentName + */ + @JsonProperty("documentName") + public void setDocumentName(String documentName) { + this.documentName = documentName; + } + + /** + * Sets contentType. + *

+ * Field description: + * MIME type of the document content (e.g., application/pdf, image/png). + * + * @param contentType + * @return This {@link NumbersDocumentMetadata instance}. + */ + public NumbersDocumentMetadata contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Returns contentType. + *

+ * Field description: + * MIME type of the document content (e.g., application/pdf, image/png). + * + * @return contentType + */ + @JsonProperty("contentType") + public String getContentType() { + return contentType; + } + + /** + * Sets contentType. + *

+ * Field description: + * MIME type of the document content (e.g., application/pdf, image/png). + * + * @param contentType + */ + @JsonProperty("contentType") + public void setContentType(String contentType) { + this.contentType = contentType; + } + + /** + * Sets contentLength. + *

+ * Field description: + * Size of the document content in bytes. + * + * @param contentLength + * @return This {@link NumbersDocumentMetadata instance}. + */ + public NumbersDocumentMetadata contentLength(Integer contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * Returns contentLength. + *

+ * Field description: + * Size of the document content in bytes. + * + * @return contentLength + */ + @JsonProperty("contentLength") + public Integer getContentLength() { + return contentLength; + } + + /** + * Sets contentLength. + *

+ * Field description: + * Size of the document content in bytes. + * + * @param contentLength + */ + @JsonProperty("contentLength") + public void setContentLength(Integer contentLength) { + this.contentLength = contentLength; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersDocumentMetadata numbersDocumentMetadata = (NumbersDocumentMetadata) o; + return Objects.equals(this.documentId, numbersDocumentMetadata.documentId) + && Objects.equals(this.documentName, numbersDocumentMetadata.documentName) + && Objects.equals(this.contentType, numbersDocumentMetadata.contentType) + && Objects.equals(this.contentLength, numbersDocumentMetadata.contentLength); + } + + @Override + public int hashCode() { + return Objects.hash(documentId, documentName, contentType, contentLength); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersDocumentMetadata {") + .append(newLine) + .append(" documentId: ") + .append(toIndentedString(documentId)) + .append(newLine) + .append(" documentName: ") + .append(toIndentedString(documentName)) + .append(newLine) + .append(" contentType: ") + .append(toIndentedString(contentType)) + .append(newLine) + .append(" contentLength: ") + .append(toIndentedString(contentLength)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersDownloadResponseModel.java b/src/main/java/com/infobip/model/NumbersDownloadResponseModel.java new file mode 100644 index 0000000..f920f74 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersDownloadResponseModel.java @@ -0,0 +1,192 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersDownloadResponseModel model. + */ +public class NumbersDownloadResponseModel { + + private String id; + + private String downloadUrl; + + private String expiresAt; + + /** + * Sets id. + *

+ * Field description: + * Unique recording identifier + * + * @param id + * @return This {@link NumbersDownloadResponseModel instance}. + */ + public NumbersDownloadResponseModel id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * Unique recording identifier + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * Unique recording identifier + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + /** + * Sets downloadUrl. + *

+ * Field description: + * File url. + * + * @param downloadUrl + * @return This {@link NumbersDownloadResponseModel instance}. + */ + public NumbersDownloadResponseModel downloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + return this; + } + + /** + * Returns downloadUrl. + *

+ * Field description: + * File url. + * + * @return downloadUrl + */ + @JsonProperty("downloadUrl") + public String getDownloadUrl() { + return downloadUrl; + } + + /** + * Sets downloadUrl. + *

+ * Field description: + * File url. + * + * @param downloadUrl + */ + @JsonProperty("downloadUrl") + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } + + /** + * Sets expiresAt. + *

+ * Field description: + * Date and time until download URL is valid. It is in *`YYYY-MM-DDThh:mm:ss.SSSZ` format `(2019-04-25T18:00:00.000+0000))`* + * + * @param expiresAt + * @return This {@link NumbersDownloadResponseModel instance}. + */ + public NumbersDownloadResponseModel expiresAt(String expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Returns expiresAt. + *

+ * Field description: + * Date and time until download URL is valid. It is in *`YYYY-MM-DDThh:mm:ss.SSSZ` format `(2019-04-25T18:00:00.000+0000))`* + * + * @return expiresAt + */ + @JsonProperty("expiresAt") + public String getExpiresAt() { + return expiresAt; + } + + /** + * Sets expiresAt. + *

+ * Field description: + * Date and time until download URL is valid. It is in *`YYYY-MM-DDThh:mm:ss.SSSZ` format `(2019-04-25T18:00:00.000+0000))`* + * + * @param expiresAt + */ + @JsonProperty("expiresAt") + public void setExpiresAt(String expiresAt) { + this.expiresAt = expiresAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersDownloadResponseModel numbersDownloadResponseModel = (NumbersDownloadResponseModel) o; + return Objects.equals(this.id, numbersDownloadResponseModel.id) + && Objects.equals(this.downloadUrl, numbersDownloadResponseModel.downloadUrl) + && Objects.equals(this.expiresAt, numbersDownloadResponseModel.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, downloadUrl, expiresAt); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersDownloadResponseModel {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" downloadUrl: ") + .append(toIndentedString(downloadUrl)) + .append(newLine) + .append(" expiresAt: ") + .append(toIndentedString(expiresAt)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersEditPermissions.java b/src/main/java/com/infobip/model/NumbersEditPermissions.java new file mode 100644 index 0000000..2974961 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersEditPermissions.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The editPermissions object to indicate editing permissions for the number. + */ +public class NumbersEditPermissions { + + private Boolean canEditNumber; + + private Boolean canEditConfiguration; + + /** + * Sets canEditNumber. + *

+ * Field description: + * Indicates whether the permissions allow for editing a number. + * + * @param canEditNumber + * @return This {@link NumbersEditPermissions instance}. + */ + public NumbersEditPermissions canEditNumber(Boolean canEditNumber) { + this.canEditNumber = canEditNumber; + return this; + } + + /** + * Returns canEditNumber. + *

+ * Field description: + * Indicates whether the permissions allow for editing a number. + * + * @return canEditNumber + */ + @JsonProperty("canEditNumber") + public Boolean getCanEditNumber() { + return canEditNumber; + } + + /** + * Sets canEditNumber. + *

+ * Field description: + * Indicates whether the permissions allow for editing a number. + * + * @param canEditNumber + */ + @JsonProperty("canEditNumber") + public void setCanEditNumber(Boolean canEditNumber) { + this.canEditNumber = canEditNumber; + } + + /** + * Sets canEditConfiguration. + *

+ * Field description: + * Indicates whether the the permissions allow for editing number configuration. + * + * @param canEditConfiguration + * @return This {@link NumbersEditPermissions instance}. + */ + public NumbersEditPermissions canEditConfiguration(Boolean canEditConfiguration) { + this.canEditConfiguration = canEditConfiguration; + return this; + } + + /** + * Returns canEditConfiguration. + *

+ * Field description: + * Indicates whether the the permissions allow for editing number configuration. + * + * @return canEditConfiguration + */ + @JsonProperty("canEditConfiguration") + public Boolean getCanEditConfiguration() { + return canEditConfiguration; + } + + /** + * Sets canEditConfiguration. + *

+ * Field description: + * Indicates whether the the permissions allow for editing number configuration. + * + * @param canEditConfiguration + */ + @JsonProperty("canEditConfiguration") + public void setCanEditConfiguration(Boolean canEditConfiguration) { + this.canEditConfiguration = canEditConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersEditPermissions numbersEditPermissions = (NumbersEditPermissions) o; + return Objects.equals(this.canEditNumber, numbersEditPermissions.canEditNumber) + && Objects.equals(this.canEditConfiguration, numbersEditPermissions.canEditConfiguration); + } + + @Override + public int hashCode() { + return Objects.hash(canEditNumber, canEditConfiguration); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersEditPermissions {") + .append(newLine) + .append(" canEditNumber: ") + .append(toIndentedString(canEditNumber)) + .append(newLine) + .append(" canEditConfiguration: ") + .append(toIndentedString(canEditConfiguration)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewError.java b/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewError.java new file mode 100644 index 0000000..83f0b58 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewError.java @@ -0,0 +1,239 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * List of compliance errors found during the AI campaign review. Empty when the review is still processing or the campaign is compliant. + */ +public class NumbersExternalAutomaticReviewError { + + private String code; + + private String justification; + + private String description; + + private String recommendation; + + /** + * Sets code. + *

+ * Field description: + * The error code identifying the type of compliance issue. + * + * @param code + * @return This {@link NumbersExternalAutomaticReviewError instance}. + */ + public NumbersExternalAutomaticReviewError code(String code) { + this.code = code; + return this; + } + + /** + * Returns code. + *

+ * Field description: + * The error code identifying the type of compliance issue. + * + * @return code + */ + @JsonProperty("code") + public String getCode() { + return code; + } + + /** + * Sets code. + *

+ * Field description: + * The error code identifying the type of compliance issue. + * + * @param code + */ + @JsonProperty("code") + public void setCode(String code) { + this.code = code; + } + + /** + * Sets justification. + *

+ * Field description: + * The justification for why this was flagged as a compliance issue. + * + * @param justification + * @return This {@link NumbersExternalAutomaticReviewError instance}. + */ + public NumbersExternalAutomaticReviewError justification(String justification) { + this.justification = justification; + return this; + } + + /** + * Returns justification. + *

+ * Field description: + * The justification for why this was flagged as a compliance issue. + * + * @return justification + */ + @JsonProperty("justification") + public String getJustification() { + return justification; + } + + /** + * Sets justification. + *

+ * Field description: + * The justification for why this was flagged as a compliance issue. + * + * @param justification + */ + @JsonProperty("justification") + public void setJustification(String justification) { + this.justification = justification; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the compliance issue. + * + * @param description + * @return This {@link NumbersExternalAutomaticReviewError instance}. + */ + public NumbersExternalAutomaticReviewError description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Description of the compliance issue. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the compliance issue. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets recommendation. + *

+ * Field description: + * The recommended action to resolve the compliance issue. + * + * @param recommendation + * @return This {@link NumbersExternalAutomaticReviewError instance}. + */ + public NumbersExternalAutomaticReviewError recommendation(String recommendation) { + this.recommendation = recommendation; + return this; + } + + /** + * Returns recommendation. + *

+ * Field description: + * The recommended action to resolve the compliance issue. + * + * @return recommendation + */ + @JsonProperty("recommendation") + public String getRecommendation() { + return recommendation; + } + + /** + * Sets recommendation. + *

+ * Field description: + * The recommended action to resolve the compliance issue. + * + * @param recommendation + */ + @JsonProperty("recommendation") + public void setRecommendation(String recommendation) { + this.recommendation = recommendation; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersExternalAutomaticReviewError numbersExternalAutomaticReviewError = + (NumbersExternalAutomaticReviewError) o; + return Objects.equals(this.code, numbersExternalAutomaticReviewError.code) + && Objects.equals(this.justification, numbersExternalAutomaticReviewError.justification) + && Objects.equals(this.description, numbersExternalAutomaticReviewError.description) + && Objects.equals(this.recommendation, numbersExternalAutomaticReviewError.recommendation); + } + + @Override + public int hashCode() { + return Objects.hash(code, justification, description, recommendation); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersExternalAutomaticReviewError {") + .append(newLine) + .append(" code: ") + .append(toIndentedString(code)) + .append(newLine) + .append(" justification: ") + .append(toIndentedString(justification)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" recommendation: ") + .append(toIndentedString(recommendation)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewResults.java b/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewResults.java new file mode 100644 index 0000000..b3f63a3 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewResults.java @@ -0,0 +1,159 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersExternalAutomaticReviewResults model. + */ +public class NumbersExternalAutomaticReviewResults { + + private NumbersExternalAutomaticReviewStatus reviewStatus; + + private List campaignErrors = null; + + /** + * Sets reviewStatus. + * + * @param reviewStatus + * @return This {@link NumbersExternalAutomaticReviewResults instance}. + */ + public NumbersExternalAutomaticReviewResults reviewStatus(NumbersExternalAutomaticReviewStatus reviewStatus) { + this.reviewStatus = reviewStatus; + return this; + } + + /** + * Returns reviewStatus. + * + * @return reviewStatus + */ + @JsonProperty("reviewStatus") + public NumbersExternalAutomaticReviewStatus getReviewStatus() { + return reviewStatus; + } + + /** + * Sets reviewStatus. + * + * @param reviewStatus + */ + @JsonProperty("reviewStatus") + public void setReviewStatus(NumbersExternalAutomaticReviewStatus reviewStatus) { + this.reviewStatus = reviewStatus; + } + + /** + * Sets campaignErrors. + *

+ * Field description: + * List of compliance errors found during the AI campaign review. Empty when the review is still processing or the campaign is compliant. + * + * @param campaignErrors + * @return This {@link NumbersExternalAutomaticReviewResults instance}. + */ + public NumbersExternalAutomaticReviewResults campaignErrors( + List campaignErrors) { + this.campaignErrors = campaignErrors; + return this; + } + + /** + * Adds and item into campaignErrors. + *

+ * Field description: + * List of compliance errors found during the AI campaign review. Empty when the review is still processing or the campaign is compliant. + * + * @param campaignErrorsItem The item to be added to the list. + * @return This {@link NumbersExternalAutomaticReviewResults instance}. + */ + public NumbersExternalAutomaticReviewResults addCampaignErrorsItem( + NumbersExternalAutomaticReviewError campaignErrorsItem) { + if (this.campaignErrors == null) { + this.campaignErrors = new ArrayList<>(); + } + this.campaignErrors.add(campaignErrorsItem); + return this; + } + + /** + * Returns campaignErrors. + *

+ * Field description: + * List of compliance errors found during the AI campaign review. Empty when the review is still processing or the campaign is compliant. + * + * @return campaignErrors + */ + @JsonProperty("campaignErrors") + public List getCampaignErrors() { + return campaignErrors; + } + + /** + * Sets campaignErrors. + *

+ * Field description: + * List of compliance errors found during the AI campaign review. Empty when the review is still processing or the campaign is compliant. + * + * @param campaignErrors + */ + @JsonProperty("campaignErrors") + public void setCampaignErrors(List campaignErrors) { + this.campaignErrors = campaignErrors; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersExternalAutomaticReviewResults numbersExternalAutomaticReviewResults = + (NumbersExternalAutomaticReviewResults) o; + return Objects.equals(this.reviewStatus, numbersExternalAutomaticReviewResults.reviewStatus) + && Objects.equals(this.campaignErrors, numbersExternalAutomaticReviewResults.campaignErrors); + } + + @Override + public int hashCode() { + return Objects.hash(reviewStatus, campaignErrors); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersExternalAutomaticReviewResults {") + .append(newLine) + .append(" reviewStatus: ") + .append(toIndentedString(reviewStatus)) + .append(newLine) + .append(" campaignErrors: ") + .append(toIndentedString(campaignErrors)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewStatus.java b/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewStatus.java new file mode 100644 index 0000000..97cb952 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersExternalAutomaticReviewStatus.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The current status of the AI campaign review. + */ +public enum NumbersExternalAutomaticReviewStatus { + PROCESSING("PROCESSING"), + COMPLIANT("COMPLIANT"), + NON_COMPLIANT("NON_COMPLIANT"); + + private final String value; + + NumbersExternalAutomaticReviewStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersExternalAutomaticReviewStatus fromValue(String value) { + for (NumbersExternalAutomaticReviewStatus enumElement : NumbersExternalAutomaticReviewStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersExternalTenDlcCampaign.java b/src/main/java/com/infobip/model/NumbersExternalTenDlcCampaign.java new file mode 100644 index 0000000..bb2258f --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersExternalTenDlcCampaign.java @@ -0,0 +1,345 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Represents NumbersExternalTenDlcCampaign model. + */ +public class NumbersExternalTenDlcCampaign extends NumbersCampaign { + + private String externalCampaignId; + + private Set numbers = null; + + private Set numberKeys = null; + + private Set numberPreviews = null; + + private NumbersNumberPool numberPool; + + /** + * Constructs a new {@link NumbersExternalTenDlcCampaign} instance. + */ + public NumbersExternalTenDlcCampaign() { + super("EXTERNAL_TEN_DIGIT_LONG_CODE"); + } + + /** + * Sets externalCampaignId. + *

+ * Field description: + * The ID of the campaign as defined by The Campaign Registry. + *

+ * The field is required. + * + * @param externalCampaignId + * @return This {@link NumbersExternalTenDlcCampaign instance}. + */ + public NumbersExternalTenDlcCampaign externalCampaignId(String externalCampaignId) { + this.externalCampaignId = externalCampaignId; + return this; + } + + /** + * Returns externalCampaignId. + *

+ * Field description: + * The ID of the campaign as defined by The Campaign Registry. + *

+ * The field is required. + * + * @return externalCampaignId + */ + @JsonProperty("externalCampaignId") + public String getExternalCampaignId() { + return externalCampaignId; + } + + /** + * Sets externalCampaignId. + *

+ * Field description: + * The ID of the campaign as defined by The Campaign Registry. + *

+ * The field is required. + * + * @param externalCampaignId + */ + @JsonProperty("externalCampaignId") + public void setExternalCampaignId(String externalCampaignId) { + this.externalCampaignId = externalCampaignId; + } + + /** + * Sets numbers. + *

+ * Field description: + * US 10DLC Numbers to be used with the campaign. + * + * @param numbers + * @return This {@link NumbersExternalTenDlcCampaign instance}. + */ + public NumbersExternalTenDlcCampaign numbers(Set numbers) { + this.numbers = numbers; + return this; + } + + /** + * Adds and item into numbers. + *

+ * Field description: + * US 10DLC Numbers to be used with the campaign. + * + * @param numbersItem The item to be added to the list. + * @return This {@link NumbersExternalTenDlcCampaign instance}. + */ + public NumbersExternalTenDlcCampaign addNumbersItem(String numbersItem) { + if (this.numbers == null) { + this.numbers = new LinkedHashSet<>(); + } + this.numbers.add(numbersItem); + return this; + } + + /** + * Returns numbers. + *

+ * Field description: + * US 10DLC Numbers to be used with the campaign. + * + * @return numbers + */ + @JsonProperty("numbers") + public Set getNumbers() { + return numbers; + } + + /** + * Sets numbers. + *

+ * Field description: + * US 10DLC Numbers to be used with the campaign. + * + * @param numbers + */ + @JsonProperty("numbers") + public void setNumbers(Set numbers) { + this.numbers = numbers; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeys + * @return This {@link NumbersExternalTenDlcCampaign instance}. + */ + public NumbersExternalTenDlcCampaign numberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + return this; + } + + /** + * Adds and item into numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeysItem The item to be added to the list. + * @return This {@link NumbersExternalTenDlcCampaign instance}. + */ + public NumbersExternalTenDlcCampaign addNumberKeysItem(String numberKeysItem) { + if (this.numberKeys == null) { + this.numberKeys = new LinkedHashSet<>(); + } + this.numberKeys.add(numberKeysItem); + return this; + } + + /** + * Returns numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @return numberKeys + */ + @JsonProperty("numberKeys") + public Set getNumberKeys() { + return numberKeys; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeys + */ + @JsonProperty("numberKeys") + public void setNumberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + } + + /** + * Sets numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviews + * @return This {@link NumbersExternalTenDlcCampaign instance}. + */ + public NumbersExternalTenDlcCampaign numberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + return this; + } + + /** + * Adds and item into numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviewsItem The item to be added to the list. + * @return This {@link NumbersExternalTenDlcCampaign instance}. + */ + public NumbersExternalTenDlcCampaign addNumberPreviewsItem(NumbersNumberPreview numberPreviewsItem) { + if (this.numberPreviews == null) { + this.numberPreviews = new LinkedHashSet<>(); + } + this.numberPreviews.add(numberPreviewsItem); + return this; + } + + /** + * Returns numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @return numberPreviews + */ + @JsonProperty("numberPreviews") + public Set getNumberPreviews() { + return numberPreviews; + } + + /** + * Sets numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviews + */ + @JsonProperty("numberPreviews") + public void setNumberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + } + + /** + * Sets numberPool. + * + * @param numberPool + * @return This {@link NumbersExternalTenDlcCampaign instance}. + */ + public NumbersExternalTenDlcCampaign numberPool(NumbersNumberPool numberPool) { + this.numberPool = numberPool; + return this; + } + + /** + * Returns numberPool. + * + * @return numberPool + */ + @JsonProperty("numberPool") + public NumbersNumberPool getNumberPool() { + return numberPool; + } + + /** + * Sets numberPool. + * + * @param numberPool + */ + @JsonProperty("numberPool") + public void setNumberPool(NumbersNumberPool numberPool) { + this.numberPool = numberPool; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersExternalTenDlcCampaign numbersExternalTenDlcCampaign = (NumbersExternalTenDlcCampaign) o; + return Objects.equals(this.externalCampaignId, numbersExternalTenDlcCampaign.externalCampaignId) + && Objects.equals(this.numbers, numbersExternalTenDlcCampaign.numbers) + && Objects.equals(this.numberKeys, numbersExternalTenDlcCampaign.numberKeys) + && Objects.equals(this.numberPreviews, numbersExternalTenDlcCampaign.numberPreviews) + && Objects.equals(this.numberPool, numbersExternalTenDlcCampaign.numberPool) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(externalCampaignId, numbers, numberKeys, numberPreviews, numberPool, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersExternalTenDlcCampaign {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" externalCampaignId: ") + .append(toIndentedString(externalCampaignId)) + .append(newLine) + .append(" numbers: ") + .append(toIndentedString(numbers)) + .append(newLine) + .append(" numberKeys: ") + .append(toIndentedString(numberKeys)) + .append(newLine) + .append(" numberPreviews: ") + .append(toIndentedString(numberPreviews)) + .append(newLine) + .append(" numberPool: ") + .append(toIndentedString(numberPool)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersForwardToCallRoutingDetails.java b/src/main/java/com/infobip/model/NumbersForwardToCallRoutingDetails.java new file mode 100644 index 0000000..2ca2c71 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersForwardToCallRoutingDetails.java @@ -0,0 +1,110 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersForwardToCallRoutingDetails model. + */ +public class NumbersForwardToCallRoutingDetails extends NumbersVoiceActionDetails { + + private String routeId; + + /** + * Constructs a new {@link NumbersForwardToCallRoutingDetails} instance. + */ + public NumbersForwardToCallRoutingDetails() { + super("FORWARD_TO_CALL_ROUTING"); + } + + /** + * Sets routeId. + *

+ * Field description: + * Unique identifier of a route. + * + * @param routeId + * @return This {@link NumbersForwardToCallRoutingDetails instance}. + */ + public NumbersForwardToCallRoutingDetails routeId(String routeId) { + this.routeId = routeId; + return this; + } + + /** + * Returns routeId. + *

+ * Field description: + * Unique identifier of a route. + * + * @return routeId + */ + @JsonProperty("routeId") + public String getRouteId() { + return routeId; + } + + /** + * Sets routeId. + *

+ * Field description: + * Unique identifier of a route. + * + * @param routeId + */ + @JsonProperty("routeId") + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersForwardToCallRoutingDetails numbersForwardToCallRoutingDetails = (NumbersForwardToCallRoutingDetails) o; + return Objects.equals(this.routeId, numbersForwardToCallRoutingDetails.routeId) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(routeId, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersForwardToCallRoutingDetails {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" routeId: ") + .append(toIndentedString(routeId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersForwardToIvrActionDetails.java b/src/main/java/com/infobip/model/NumbersForwardToIvrActionDetails.java new file mode 100644 index 0000000..fb9f3f4 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersForwardToIvrActionDetails.java @@ -0,0 +1,116 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersForwardToIvrActionDetails model. + */ +public class NumbersForwardToIvrActionDetails extends NumbersVoiceActionDetails { + + private String scenarioKey; + + /** + * Constructs a new {@link NumbersForwardToIvrActionDetails} instance. + */ + public NumbersForwardToIvrActionDetails() { + super("FORWARD_TO_IVR"); + } + + /** + * Sets scenarioKey. + *

+ * Field description: + * Unique ID of the IVR scenario. + *

+ * The field is required. + * + * @param scenarioKey + * @return This {@link NumbersForwardToIvrActionDetails instance}. + */ + public NumbersForwardToIvrActionDetails scenarioKey(String scenarioKey) { + this.scenarioKey = scenarioKey; + return this; + } + + /** + * Returns scenarioKey. + *

+ * Field description: + * Unique ID of the IVR scenario. + *

+ * The field is required. + * + * @return scenarioKey + */ + @JsonProperty("scenarioKey") + public String getScenarioKey() { + return scenarioKey; + } + + /** + * Sets scenarioKey. + *

+ * Field description: + * Unique ID of the IVR scenario. + *

+ * The field is required. + * + * @param scenarioKey + */ + @JsonProperty("scenarioKey") + public void setScenarioKey(String scenarioKey) { + this.scenarioKey = scenarioKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersForwardToIvrActionDetails numbersForwardToIvrActionDetails = (NumbersForwardToIvrActionDetails) o; + return Objects.equals(this.scenarioKey, numbersForwardToIvrActionDetails.scenarioKey) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(scenarioKey, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersForwardToIvrActionDetails {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" scenarioKey: ") + .append(toIndentedString(scenarioKey)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersForwardToPstnActionDetails.java b/src/main/java/com/infobip/model/NumbersForwardToPstnActionDetails.java new file mode 100644 index 0000000..c1ba058 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersForwardToPstnActionDetails.java @@ -0,0 +1,107 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersForwardToPstnActionDetails model. + */ +public class NumbersForwardToPstnActionDetails extends NumbersVoiceActionDetails { + + private String pstnNumber; + + /** + * Constructs a new {@link NumbersForwardToPstnActionDetails} instance. + */ + public NumbersForwardToPstnActionDetails() { + super("FORWARD_TO_PSTN"); + } + + /** + * Sets pstnNumber. + *

+ * The field is required. + * + * @param pstnNumber + * @return This {@link NumbersForwardToPstnActionDetails instance}. + */ + public NumbersForwardToPstnActionDetails pstnNumber(String pstnNumber) { + this.pstnNumber = pstnNumber; + return this; + } + + /** + * Returns pstnNumber. + *

+ * The field is required. + * + * @return pstnNumber + */ + @JsonProperty("pstnNumber") + public String getPstnNumber() { + return pstnNumber; + } + + /** + * Sets pstnNumber. + *

+ * The field is required. + * + * @param pstnNumber + */ + @JsonProperty("pstnNumber") + public void setPstnNumber(String pstnNumber) { + this.pstnNumber = pstnNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersForwardToPstnActionDetails numbersForwardToPstnActionDetails = (NumbersForwardToPstnActionDetails) o; + return Objects.equals(this.pstnNumber, numbersForwardToPstnActionDetails.pstnNumber) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(pstnNumber, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersForwardToPstnActionDetails {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" pstnNumber: ") + .append(toIndentedString(pstnNumber)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersForwardToSubscriptionDetails.java b/src/main/java/com/infobip/model/NumbersForwardToSubscriptionDetails.java new file mode 100644 index 0000000..b6939d1 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersForwardToSubscriptionDetails.java @@ -0,0 +1,112 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersForwardToSubscriptionDetails model. + */ +public class NumbersForwardToSubscriptionDetails extends NumbersVoiceActionDetails { + + private String callsConfigurationId; + + /** + * Constructs a new {@link NumbersForwardToSubscriptionDetails} instance. + */ + public NumbersForwardToSubscriptionDetails() { + super("FORWARD_TO_SUBSCRIPTION"); + } + + /** + * Sets callsConfigurationId. + *

+ * Field description: + * Unique identifier of a Calls Configuration. + * + * @param callsConfigurationId + * @return This {@link NumbersForwardToSubscriptionDetails instance}. + */ + public NumbersForwardToSubscriptionDetails callsConfigurationId(String callsConfigurationId) { + this.callsConfigurationId = callsConfigurationId; + return this; + } + + /** + * Returns callsConfigurationId. + *

+ * Field description: + * Unique identifier of a Calls Configuration. + * + * @return callsConfigurationId + */ + @JsonProperty("callsConfigurationId") + public String getCallsConfigurationId() { + return callsConfigurationId; + } + + /** + * Sets callsConfigurationId. + *

+ * Field description: + * Unique identifier of a Calls Configuration. + * + * @param callsConfigurationId + */ + @JsonProperty("callsConfigurationId") + public void setCallsConfigurationId(String callsConfigurationId) { + this.callsConfigurationId = callsConfigurationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersForwardToSubscriptionDetails numbersForwardToSubscriptionDetails = + (NumbersForwardToSubscriptionDetails) o; + return Objects.equals(this.callsConfigurationId, numbersForwardToSubscriptionDetails.callsConfigurationId) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(callsConfigurationId, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersForwardToSubscriptionDetails {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" callsConfigurationId: ") + .append(toIndentedString(callsConfigurationId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersGlobalIntermediaryIdentificationNumber.java b/src/main/java/com/infobip/model/NumbersGlobalIntermediaryIdentificationNumber.java new file mode 100644 index 0000000..7e9a844 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersGlobalIntermediaryIdentificationNumber.java @@ -0,0 +1,117 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersGlobalIntermediaryIdentificationNumber model. + */ +public class NumbersGlobalIntermediaryIdentificationNumber extends NumbersBusinessIdentifier { + + private String id; + + /** + * Constructs a new {@link NumbersGlobalIntermediaryIdentificationNumber} instance. + */ + public NumbersGlobalIntermediaryIdentificationNumber() { + super("GIIN"); + } + + /** + * Sets id. + *

+ * Field description: + * The GIIN identifier. + *

+ * The field is required. + * + * @param id + * @return This {@link NumbersGlobalIntermediaryIdentificationNumber instance}. + */ + public NumbersGlobalIntermediaryIdentificationNumber id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The GIIN identifier. + *

+ * The field is required. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The GIIN identifier. + *

+ * The field is required. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersGlobalIntermediaryIdentificationNumber numbersGlobalIntermediaryIdentificationNumber = + (NumbersGlobalIntermediaryIdentificationNumber) o; + return Objects.equals(this.id, numbersGlobalIntermediaryIdentificationNumber.id) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersGlobalIntermediaryIdentificationNumber {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersGovernmentBrand.java b/src/main/java/com/infobip/model/NumbersGovernmentBrand.java new file mode 100644 index 0000000..047a799 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersGovernmentBrand.java @@ -0,0 +1,692 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersGovernmentBrand model. + */ +public class NumbersGovernmentBrand extends NumbersBrand { + + private String referenceId; + + private NumbersAddress address; + + private String countryCode; + + private String supportPhone; + + private String supportEmail; + + private String businessContactFirstName; + + private String businessContactLastName; + + private String businessDBA; + + private String legalName; + + private NumbersBusinessIdentifier alternateBusinessId; + + private NumbersVertical vertical; + + private String taxId; + + private String taxIdIssuingCountry; + + /** + * Constructs a new {@link NumbersGovernmentBrand} instance. + */ + public NumbersGovernmentBrand() { + super("TENDLC_GOVERNMENT"); + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Returns referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @return referenceId + */ + @JsonProperty("referenceId") + public String getReferenceId() { + return referenceId; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + */ + @JsonProperty("referenceId") + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand address(NumbersAddress address) { + this.address = address; + return this; + } + + /** + * Returns address. + *

+ * The field is required. + * + * @return address + */ + @JsonProperty("address") + public NumbersAddress getAddress() { + return address; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + */ + @JsonProperty("address") + public void setAddress(NumbersAddress address) { + this.address = address; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand supportPhone(String supportPhone) { + this.supportPhone = supportPhone; + return this; + } + + /** + * Returns supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @return supportPhone + */ + @JsonProperty("supportPhone") + public String getSupportPhone() { + return supportPhone; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + */ + @JsonProperty("supportPhone") + public void setSupportPhone(String supportPhone) { + this.supportPhone = supportPhone; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand supportEmail(String supportEmail) { + this.supportEmail = supportEmail; + return this; + } + + /** + * Returns supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return supportEmail + */ + @JsonProperty("supportEmail") + public String getSupportEmail() { + return supportEmail; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + */ + @JsonProperty("supportEmail") + public void setSupportEmail(String supportEmail) { + this.supportEmail = supportEmail; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @param businessContactFirstName + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand businessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + return this; + } + + /** + * Returns businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @return businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public String getBusinessContactFirstName() { + return businessContactFirstName; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @param businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public void setBusinessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @param businessContactLastName + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand businessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + return this; + } + + /** + * Returns businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @return businessContactLastName + */ + @JsonProperty("businessContactLastName") + public String getBusinessContactLastName() { + return businessContactLastName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @param businessContactLastName + */ + @JsonProperty("businessContactLastName") + public void setBusinessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand businessDBA(String businessDBA) { + this.businessDBA = businessDBA; + return this; + } + + /** + * Returns businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @return businessDBA + */ + @JsonProperty("businessDBA") + public String getBusinessDBA() { + return businessDBA; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + */ + @JsonProperty("businessDBA") + public void setBusinessDBA(String businessDBA) { + this.businessDBA = businessDBA; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand legalName(String legalName) { + this.legalName = legalName; + return this; + } + + /** + * Returns legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @return legalName + */ + @JsonProperty("legalName") + public String getLegalName() { + return legalName; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + */ + @JsonProperty("legalName") + public void setLegalName(String legalName) { + this.legalName = legalName; + } + + /** + * Sets alternateBusinessId. + * + * @param alternateBusinessId + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand alternateBusinessId(NumbersBusinessIdentifier alternateBusinessId) { + this.alternateBusinessId = alternateBusinessId; + return this; + } + + /** + * Returns alternateBusinessId. + * + * @return alternateBusinessId + */ + @JsonProperty("alternateBusinessId") + public NumbersBusinessIdentifier getAlternateBusinessId() { + return alternateBusinessId; + } + + /** + * Sets alternateBusinessId. + * + * @param alternateBusinessId + */ + @JsonProperty("alternateBusinessId") + public void setAlternateBusinessId(NumbersBusinessIdentifier alternateBusinessId) { + this.alternateBusinessId = alternateBusinessId; + } + + /** + * Sets vertical. + *

+ * The field is required. + * + * @param vertical + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand vertical(NumbersVertical vertical) { + this.vertical = vertical; + return this; + } + + /** + * Returns vertical. + *

+ * The field is required. + * + * @return vertical + */ + @JsonProperty("vertical") + public NumbersVertical getVertical() { + return vertical; + } + + /** + * Sets vertical. + *

+ * The field is required. + * + * @param vertical + */ + @JsonProperty("vertical") + public void setVertical(NumbersVertical vertical) { + this.vertical = vertical; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Returns taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @return taxId + */ + @JsonProperty("taxId") + public String getTaxId() { + return taxId; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + */ + @JsonProperty("taxId") + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + * @return This {@link NumbersGovernmentBrand instance}. + */ + public NumbersGovernmentBrand taxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + return this; + } + + /** + * Returns taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @return taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public String getTaxIdIssuingCountry() { + return taxIdIssuingCountry; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public void setTaxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersGovernmentBrand numbersGovernmentBrand = (NumbersGovernmentBrand) o; + return Objects.equals(this.referenceId, numbersGovernmentBrand.referenceId) + && Objects.equals(this.address, numbersGovernmentBrand.address) + && Objects.equals(this.countryCode, numbersGovernmentBrand.countryCode) + && Objects.equals(this.supportPhone, numbersGovernmentBrand.supportPhone) + && Objects.equals(this.supportEmail, numbersGovernmentBrand.supportEmail) + && Objects.equals(this.businessContactFirstName, numbersGovernmentBrand.businessContactFirstName) + && Objects.equals(this.businessContactLastName, numbersGovernmentBrand.businessContactLastName) + && Objects.equals(this.businessDBA, numbersGovernmentBrand.businessDBA) + && Objects.equals(this.legalName, numbersGovernmentBrand.legalName) + && Objects.equals(this.alternateBusinessId, numbersGovernmentBrand.alternateBusinessId) + && Objects.equals(this.vertical, numbersGovernmentBrand.vertical) + && Objects.equals(this.taxId, numbersGovernmentBrand.taxId) + && Objects.equals(this.taxIdIssuingCountry, numbersGovernmentBrand.taxIdIssuingCountry) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + referenceId, + address, + countryCode, + supportPhone, + supportEmail, + businessContactFirstName, + businessContactLastName, + businessDBA, + legalName, + alternateBusinessId, + vertical, + taxId, + taxIdIssuingCountry, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersGovernmentBrand {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" referenceId: ") + .append(toIndentedString(referenceId)) + .append(newLine) + .append(" address: ") + .append(toIndentedString(address)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" supportPhone: ") + .append(toIndentedString(supportPhone)) + .append(newLine) + .append(" supportEmail: ") + .append(toIndentedString(supportEmail)) + .append(newLine) + .append(" businessContactFirstName: ") + .append(toIndentedString(businessContactFirstName)) + .append(newLine) + .append(" businessContactLastName: ") + .append(toIndentedString(businessContactLastName)) + .append(newLine) + .append(" businessDBA: ") + .append(toIndentedString(businessDBA)) + .append(newLine) + .append(" legalName: ") + .append(toIndentedString(legalName)) + .append(newLine) + .append(" alternateBusinessId: ") + .append(toIndentedString(alternateBusinessId)) + .append(newLine) + .append(" vertical: ") + .append(toIndentedString(vertical)) + .append(newLine) + .append(" taxId: ") + .append(toIndentedString(taxId)) + .append(newLine) + .append(" taxIdIssuingCountry: ") + .append(toIndentedString(taxIdIssuingCountry)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersInteractiveVoiceResponseOptIn.java b/src/main/java/com/infobip/model/NumbersInteractiveVoiceResponseOptIn.java new file mode 100644 index 0000000..b5cca44 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersInteractiveVoiceResponseOptIn.java @@ -0,0 +1,107 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The type of opt in that requires a user to record a confirmation. + */ +public class NumbersInteractiveVoiceResponseOptIn { + + private String callToAction; + + /** + * Sets callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @param callToAction + * @return This {@link NumbersInteractiveVoiceResponseOptIn instance}. + */ + public NumbersInteractiveVoiceResponseOptIn callToAction(String callToAction) { + this.callToAction = callToAction; + return this; + } + + /** + * Returns callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @return callToAction + */ + @JsonProperty("callToAction") + public String getCallToAction() { + return callToAction; + } + + /** + * Sets callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @param callToAction + */ + @JsonProperty("callToAction") + public void setCallToAction(String callToAction) { + this.callToAction = callToAction; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersInteractiveVoiceResponseOptIn numbersInteractiveVoiceResponseOptIn = + (NumbersInteractiveVoiceResponseOptIn) o; + return Objects.equals(this.callToAction, numbersInteractiveVoiceResponseOptIn.callToAction); + } + + @Override + public int hashCode() { + return Objects.hash(callToAction); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersInteractiveVoiceResponseOptIn {") + .append(newLine) + .append(" callToAction: ") + .append(toIndentedString(callToAction)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersKeywordOptIn.java b/src/main/java/com/infobip/model/NumbersKeywordOptIn.java new file mode 100644 index 0000000..09a4321 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersKeywordOptIn.java @@ -0,0 +1,179 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * The type of opt in that requires a user to type in a keyword. + */ +public class NumbersKeywordOptIn { + + private String callToAction; + + private List keywords = new ArrayList<>(); + + /** + * Sets callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @param callToAction + * @return This {@link NumbersKeywordOptIn instance}. + */ + public NumbersKeywordOptIn callToAction(String callToAction) { + this.callToAction = callToAction; + return this; + } + + /** + * Returns callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @return callToAction + */ + @JsonProperty("callToAction") + public String getCallToAction() { + return callToAction; + } + + /** + * Sets callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @param callToAction + */ + @JsonProperty("callToAction") + public void setCallToAction(String callToAction) { + this.callToAction = callToAction; + } + + /** + * Sets keywords. + *

+ * Field description: + * The keyword(s) the user will text to subscribe. Keyword(s) must include only uppercase letters and numbers. + *

+ * The field is required. + * + * @param keywords + * @return This {@link NumbersKeywordOptIn instance}. + */ + public NumbersKeywordOptIn keywords(List keywords) { + this.keywords = keywords; + return this; + } + + /** + * Adds and item into keywords. + *

+ * Field description: + * The keyword(s) the user will text to subscribe. Keyword(s) must include only uppercase letters and numbers. + *

+ * The field is required. + * + * @param keywordsItem The item to be added to the list. + * @return This {@link NumbersKeywordOptIn instance}. + */ + public NumbersKeywordOptIn addKeywordsItem(String keywordsItem) { + if (this.keywords == null) { + this.keywords = new ArrayList<>(); + } + this.keywords.add(keywordsItem); + return this; + } + + /** + * Returns keywords. + *

+ * Field description: + * The keyword(s) the user will text to subscribe. Keyword(s) must include only uppercase letters and numbers. + *

+ * The field is required. + * + * @return keywords + */ + @JsonProperty("keywords") + public List getKeywords() { + return keywords; + } + + /** + * Sets keywords. + *

+ * Field description: + * The keyword(s) the user will text to subscribe. Keyword(s) must include only uppercase letters and numbers. + *

+ * The field is required. + * + * @param keywords + */ + @JsonProperty("keywords") + public void setKeywords(List keywords) { + this.keywords = keywords; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersKeywordOptIn numbersKeywordOptIn = (NumbersKeywordOptIn) o; + return Objects.equals(this.callToAction, numbersKeywordOptIn.callToAction) + && Objects.equals(this.keywords, numbersKeywordOptIn.keywords); + } + + @Override + public int hashCode() { + return Objects.hash(callToAction, keywords); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersKeywordOptIn {") + .append(newLine) + .append(" callToAction: ") + .append(toIndentedString(callToAction)) + .append(newLine) + .append(" keywords: ") + .append(toIndentedString(keywords)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersLegalEntityIdentifier.java b/src/main/java/com/infobip/model/NumbersLegalEntityIdentifier.java new file mode 100644 index 0000000..aa3fce5 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersLegalEntityIdentifier.java @@ -0,0 +1,116 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersLegalEntityIdentifier model. + */ +public class NumbersLegalEntityIdentifier extends NumbersBusinessIdentifier { + + private String id; + + /** + * Constructs a new {@link NumbersLegalEntityIdentifier} instance. + */ + public NumbersLegalEntityIdentifier() { + super("LEI"); + } + + /** + * Sets id. + *

+ * Field description: + * The LEI identifier. + *

+ * The field is required. + * + * @param id + * @return This {@link NumbersLegalEntityIdentifier instance}. + */ + public NumbersLegalEntityIdentifier id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The LEI identifier. + *

+ * The field is required. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The LEI identifier. + *

+ * The field is required. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersLegalEntityIdentifier numbersLegalEntityIdentifier = (NumbersLegalEntityIdentifier) o; + return Objects.equals(this.id, numbersLegalEntityIdentifier.id) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersLegalEntityIdentifier {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersMessageType.java b/src/main/java/com/infobip/model/NumbersMessageType.java new file mode 100644 index 0000000..4815438 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersMessageType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The message type(s) this campaign will use to send messages. + */ +public enum NumbersMessageType { + SMS("SMS"), + MMS("MMS"); + + private final String value; + + NumbersMessageType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersMessageType fromValue(String value) { + for (NumbersMessageType enumElement : NumbersMessageType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNetwork.java b/src/main/java/com/infobip/model/NumbersNetwork.java new file mode 100644 index 0000000..8312161 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNetwork.java @@ -0,0 +1,52 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The network with which the campaign has been registered. + */ +public enum NumbersNetwork { + ATT("ATT"), + T_MOBILE("T_MOBILE"), + VERIZON("VERIZON"), + US_CELLULAR("US_CELLULAR"), + INTEROP("INTEROP"), + CLEARSKY("CLEARSKY"), + GOOGLE_VOICE("GOOGLE_VOICE"); + + private final String value; + + NumbersNetwork(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersNetwork fromValue(String value) { + for (NumbersNetwork enumElement : NumbersNetwork.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNetworkState.java b/src/main/java/com/infobip/model/NumbersNetworkState.java new file mode 100644 index 0000000..f49a5b3 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNetworkState.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of the campaign's registration with this network. + */ +public enum NumbersNetworkState { + ACTIVE("ACTIVE"), + PENDING("PENDING"), + NOT_REGISTERED("NOT_REGISTERED"), + CERTIFICATION("CERTIFICATION"); + + private final String value; + + NumbersNetworkState(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersNetworkState fromValue(String value) { + for (NumbersNetworkState enumElement : NumbersNetworkState.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNetworkStatus.java b/src/main/java/com/infobip/model/NumbersNetworkStatus.java new file mode 100644 index 0000000..684a6ce --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNetworkStatus.java @@ -0,0 +1,266 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersNetworkStatus model. + */ +public class NumbersNetworkStatus { + + private NumbersNetwork network; + + private NumbersNetworkState state; + + private String messageClass; + + private Integer throughput; + + private String brandTier; + + /** + * Sets network. + * + * @param network + * @return This {@link NumbersNetworkStatus instance}. + */ + public NumbersNetworkStatus network(NumbersNetwork network) { + this.network = network; + return this; + } + + /** + * Returns network. + * + * @return network + */ + @JsonProperty("network") + public NumbersNetwork getNetwork() { + return network; + } + + /** + * Sets network. + * + * @param network + */ + @JsonProperty("network") + public void setNetwork(NumbersNetwork network) { + this.network = network; + } + + /** + * Sets state. + * + * @param state + * @return This {@link NumbersNetworkStatus instance}. + */ + public NumbersNetworkStatus state(NumbersNetworkState state) { + this.state = state; + return this; + } + + /** + * Returns state. + * + * @return state + */ + @JsonProperty("state") + public NumbersNetworkState getState() { + return state; + } + + /** + * Sets state. + * + * @param state + */ + @JsonProperty("state") + public void setState(NumbersNetworkState state) { + this.state = state; + } + + /** + * Sets messageClass. + *

+ * Field description: + * This value is provided by some carriers to help determine throughput and daily limits. Refer to the [current documentation](https://www.infobip.com/docs/10dlc/throughput) for how to interpret these values as they may change over time. + * + * @param messageClass + * @return This {@link NumbersNetworkStatus instance}. + */ + public NumbersNetworkStatus messageClass(String messageClass) { + this.messageClass = messageClass; + return this; + } + + /** + * Returns messageClass. + *

+ * Field description: + * This value is provided by some carriers to help determine throughput and daily limits. Refer to the [current documentation](https://www.infobip.com/docs/10dlc/throughput) for how to interpret these values as they may change over time. + * + * @return messageClass + */ + @JsonProperty("messageClass") + public String getMessageClass() { + return messageClass; + } + + /** + * Sets messageClass. + *

+ * Field description: + * This value is provided by some carriers to help determine throughput and daily limits. Refer to the [current documentation](https://www.infobip.com/docs/10dlc/throughput) for how to interpret these values as they may change over time. + * + * @param messageClass + */ + @JsonProperty("messageClass") + public void setMessageClass(String messageClass) { + this.messageClass = messageClass; + } + + /** + * Sets throughput. + *

+ * Field description: + * This value represents the throughput limit, which is calculated based on the message class and brand tier. Its meaning varies depending on the carrier: for AT&T, it denotes messages per minute, while for T-Mobile, it denotes messages per day. If the throughput value is null, the throughput is considered unlimited. + * + * @param throughput + * @return This {@link NumbersNetworkStatus instance}. + */ + public NumbersNetworkStatus throughput(Integer throughput) { + this.throughput = throughput; + return this; + } + + /** + * Returns throughput. + *

+ * Field description: + * This value represents the throughput limit, which is calculated based on the message class and brand tier. Its meaning varies depending on the carrier: for AT&T, it denotes messages per minute, while for T-Mobile, it denotes messages per day. If the throughput value is null, the throughput is considered unlimited. + * + * @return throughput + */ + @JsonProperty("throughput") + public Integer getThroughput() { + return throughput; + } + + /** + * Sets throughput. + *

+ * Field description: + * This value represents the throughput limit, which is calculated based on the message class and brand tier. Its meaning varies depending on the carrier: for AT&T, it denotes messages per minute, while for T-Mobile, it denotes messages per day. If the throughput value is null, the throughput is considered unlimited. + * + * @param throughput + */ + @JsonProperty("throughput") + public void setThroughput(Integer throughput) { + this.throughput = throughput; + } + + /** + * Sets brandTier. + *

+ * Field description: + * This value indicates the brand tier for T-Mobile, which determines the corresponding throughput limit. + * + * @param brandTier + * @return This {@link NumbersNetworkStatus instance}. + */ + public NumbersNetworkStatus brandTier(String brandTier) { + this.brandTier = brandTier; + return this; + } + + /** + * Returns brandTier. + *

+ * Field description: + * This value indicates the brand tier for T-Mobile, which determines the corresponding throughput limit. + * + * @return brandTier + */ + @JsonProperty("brandTier") + public String getBrandTier() { + return brandTier; + } + + /** + * Sets brandTier. + *

+ * Field description: + * This value indicates the brand tier for T-Mobile, which determines the corresponding throughput limit. + * + * @param brandTier + */ + @JsonProperty("brandTier") + public void setBrandTier(String brandTier) { + this.brandTier = brandTier; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNetworkStatus numbersNetworkStatus = (NumbersNetworkStatus) o; + return Objects.equals(this.network, numbersNetworkStatus.network) + && Objects.equals(this.state, numbersNetworkStatus.state) + && Objects.equals(this.messageClass, numbersNetworkStatus.messageClass) + && Objects.equals(this.throughput, numbersNetworkStatus.throughput) + && Objects.equals(this.brandTier, numbersNetworkStatus.brandTier); + } + + @Override + public int hashCode() { + return Objects.hash(network, state, messageClass, throughput, brandTier); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNetworkStatus {") + .append(newLine) + .append(" network: ") + .append(toIndentedString(network)) + .append(newLine) + .append(" state: ") + .append(toIndentedString(state)) + .append(newLine) + .append(" messageClass: ") + .append(toIndentedString(messageClass)) + .append(newLine) + .append(" throughput: ") + .append(toIndentedString(throughput)) + .append(newLine) + .append(" brandTier: ") + .append(toIndentedString(brandTier)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNonProfitBrand.java b/src/main/java/com/infobip/model/NumbersNonProfitBrand.java new file mode 100644 index 0000000..c1ba622 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNonProfitBrand.java @@ -0,0 +1,739 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersNonProfitBrand model. + */ +public class NumbersNonProfitBrand extends NumbersBrand { + + private String referenceId; + + private NumbersAddress address; + + private String countryCode; + + private String supportPhone; + + private String supportEmail; + + private String businessContactFirstName; + + private String businessContactLastName; + + private String businessDBA; + + private String legalName; + + private NumbersBusinessIdentifier alternateBusinessId; + + private NumbersVertical vertical; + + private String taxId; + + private String taxIdIssuingCountry; + + private String taxExemptStatus; + + /** + * Constructs a new {@link NumbersNonProfitBrand} instance. + */ + public NumbersNonProfitBrand() { + super("TENDLC_NON_PROFIT"); + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Returns referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @return referenceId + */ + @JsonProperty("referenceId") + public String getReferenceId() { + return referenceId; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + */ + @JsonProperty("referenceId") + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand address(NumbersAddress address) { + this.address = address; + return this; + } + + /** + * Returns address. + *

+ * The field is required. + * + * @return address + */ + @JsonProperty("address") + public NumbersAddress getAddress() { + return address; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + */ + @JsonProperty("address") + public void setAddress(NumbersAddress address) { + this.address = address; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand supportPhone(String supportPhone) { + this.supportPhone = supportPhone; + return this; + } + + /** + * Returns supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @return supportPhone + */ + @JsonProperty("supportPhone") + public String getSupportPhone() { + return supportPhone; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + */ + @JsonProperty("supportPhone") + public void setSupportPhone(String supportPhone) { + this.supportPhone = supportPhone; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand supportEmail(String supportEmail) { + this.supportEmail = supportEmail; + return this; + } + + /** + * Returns supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return supportEmail + */ + @JsonProperty("supportEmail") + public String getSupportEmail() { + return supportEmail; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + */ + @JsonProperty("supportEmail") + public void setSupportEmail(String supportEmail) { + this.supportEmail = supportEmail; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @param businessContactFirstName + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand businessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + return this; + } + + /** + * Returns businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @return businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public String getBusinessContactFirstName() { + return businessContactFirstName; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @param businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public void setBusinessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @param businessContactLastName + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand businessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + return this; + } + + /** + * Returns businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @return businessContactLastName + */ + @JsonProperty("businessContactLastName") + public String getBusinessContactLastName() { + return businessContactLastName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @param businessContactLastName + */ + @JsonProperty("businessContactLastName") + public void setBusinessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand businessDBA(String businessDBA) { + this.businessDBA = businessDBA; + return this; + } + + /** + * Returns businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @return businessDBA + */ + @JsonProperty("businessDBA") + public String getBusinessDBA() { + return businessDBA; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + */ + @JsonProperty("businessDBA") + public void setBusinessDBA(String businessDBA) { + this.businessDBA = businessDBA; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand legalName(String legalName) { + this.legalName = legalName; + return this; + } + + /** + * Returns legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @return legalName + */ + @JsonProperty("legalName") + public String getLegalName() { + return legalName; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + */ + @JsonProperty("legalName") + public void setLegalName(String legalName) { + this.legalName = legalName; + } + + /** + * Sets alternateBusinessId. + * + * @param alternateBusinessId + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand alternateBusinessId(NumbersBusinessIdentifier alternateBusinessId) { + this.alternateBusinessId = alternateBusinessId; + return this; + } + + /** + * Returns alternateBusinessId. + * + * @return alternateBusinessId + */ + @JsonProperty("alternateBusinessId") + public NumbersBusinessIdentifier getAlternateBusinessId() { + return alternateBusinessId; + } + + /** + * Sets alternateBusinessId. + * + * @param alternateBusinessId + */ + @JsonProperty("alternateBusinessId") + public void setAlternateBusinessId(NumbersBusinessIdentifier alternateBusinessId) { + this.alternateBusinessId = alternateBusinessId; + } + + /** + * Sets vertical. + *

+ * The field is required. + * + * @param vertical + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand vertical(NumbersVertical vertical) { + this.vertical = vertical; + return this; + } + + /** + * Returns vertical. + *

+ * The field is required. + * + * @return vertical + */ + @JsonProperty("vertical") + public NumbersVertical getVertical() { + return vertical; + } + + /** + * Sets vertical. + *

+ * The field is required. + * + * @param vertical + */ + @JsonProperty("vertical") + public void setVertical(NumbersVertical vertical) { + this.vertical = vertical; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Returns taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @return taxId + */ + @JsonProperty("taxId") + public String getTaxId() { + return taxId; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + */ + @JsonProperty("taxId") + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand taxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + return this; + } + + /** + * Returns taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @return taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public String getTaxIdIssuingCountry() { + return taxIdIssuingCountry; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public void setTaxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + } + + /** + * Sets taxExemptStatus. + *

+ * Field description: + * The tax exempt status per section 501 of the US tax code for non profit brands. + * + * @param taxExemptStatus + * @return This {@link NumbersNonProfitBrand instance}. + */ + public NumbersNonProfitBrand taxExemptStatus(String taxExemptStatus) { + this.taxExemptStatus = taxExemptStatus; + return this; + } + + /** + * Returns taxExemptStatus. + *

+ * Field description: + * The tax exempt status per section 501 of the US tax code for non profit brands. + * + * @return taxExemptStatus + */ + @JsonProperty("taxExemptStatus") + public String getTaxExemptStatus() { + return taxExemptStatus; + } + + /** + * Sets taxExemptStatus. + *

+ * Field description: + * The tax exempt status per section 501 of the US tax code for non profit brands. + * + * @param taxExemptStatus + */ + @JsonProperty("taxExemptStatus") + public void setTaxExemptStatus(String taxExemptStatus) { + this.taxExemptStatus = taxExemptStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNonProfitBrand numbersNonProfitBrand = (NumbersNonProfitBrand) o; + return Objects.equals(this.referenceId, numbersNonProfitBrand.referenceId) + && Objects.equals(this.address, numbersNonProfitBrand.address) + && Objects.equals(this.countryCode, numbersNonProfitBrand.countryCode) + && Objects.equals(this.supportPhone, numbersNonProfitBrand.supportPhone) + && Objects.equals(this.supportEmail, numbersNonProfitBrand.supportEmail) + && Objects.equals(this.businessContactFirstName, numbersNonProfitBrand.businessContactFirstName) + && Objects.equals(this.businessContactLastName, numbersNonProfitBrand.businessContactLastName) + && Objects.equals(this.businessDBA, numbersNonProfitBrand.businessDBA) + && Objects.equals(this.legalName, numbersNonProfitBrand.legalName) + && Objects.equals(this.alternateBusinessId, numbersNonProfitBrand.alternateBusinessId) + && Objects.equals(this.vertical, numbersNonProfitBrand.vertical) + && Objects.equals(this.taxId, numbersNonProfitBrand.taxId) + && Objects.equals(this.taxIdIssuingCountry, numbersNonProfitBrand.taxIdIssuingCountry) + && Objects.equals(this.taxExemptStatus, numbersNonProfitBrand.taxExemptStatus) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + referenceId, + address, + countryCode, + supportPhone, + supportEmail, + businessContactFirstName, + businessContactLastName, + businessDBA, + legalName, + alternateBusinessId, + vertical, + taxId, + taxIdIssuingCountry, + taxExemptStatus, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNonProfitBrand {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" referenceId: ") + .append(toIndentedString(referenceId)) + .append(newLine) + .append(" address: ") + .append(toIndentedString(address)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" supportPhone: ") + .append(toIndentedString(supportPhone)) + .append(newLine) + .append(" supportEmail: ") + .append(toIndentedString(supportEmail)) + .append(newLine) + .append(" businessContactFirstName: ") + .append(toIndentedString(businessContactFirstName)) + .append(newLine) + .append(" businessContactLastName: ") + .append(toIndentedString(businessContactLastName)) + .append(newLine) + .append(" businessDBA: ") + .append(toIndentedString(businessDBA)) + .append(newLine) + .append(" legalName: ") + .append(toIndentedString(legalName)) + .append(newLine) + .append(" alternateBusinessId: ") + .append(toIndentedString(alternateBusinessId)) + .append(newLine) + .append(" vertical: ") + .append(toIndentedString(vertical)) + .append(newLine) + .append(" taxId: ") + .append(toIndentedString(taxId)) + .append(newLine) + .append(" taxIdIssuingCountry: ") + .append(toIndentedString(taxIdIssuingCountry)) + .append(newLine) + .append(" taxExemptStatus: ") + .append(toIndentedString(taxExemptStatus)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberCapabilityType.java b/src/main/java/com/infobip/model/NumbersNumberCapabilityType.java new file mode 100644 index 0000000..b069128 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberCapabilityType.java @@ -0,0 +1,50 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * An array of communication channels the number can support. + */ +public enum NumbersNumberCapabilityType { + SMS("SMS"), + VOICE("VOICE"), + MMS("MMS"), + WHATSAPP("WHATSAPP"), + WHATSAPP_VOICE("WHATSAPP_VOICE"); + + private final String value; + + NumbersNumberCapabilityType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersNumberCapabilityType fromValue(String value) { + for (NumbersNumberCapabilityType enumElement : NumbersNumberCapabilityType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberConfigurationModel.java b/src/main/java/com/infobip/model/NumbersNumberConfigurationModel.java new file mode 100644 index 0000000..067b0a6 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberConfigurationModel.java @@ -0,0 +1,137 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersNumberConfigurationModel model. + */ +public class NumbersNumberConfigurationModel { + + private String numberKey; + + private NumbersRecordingBody recording; + + /** + * Sets numberKey. + *

+ * Field description: + * *numberKey* - available through number configuration + * + * @param numberKey + * @return This {@link NumbersNumberConfigurationModel instance}. + */ + public NumbersNumberConfigurationModel numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * *numberKey* - available through number configuration + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * *numberKey* - available through number configuration + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets recording. + * + * @param recording + * @return This {@link NumbersNumberConfigurationModel instance}. + */ + public NumbersNumberConfigurationModel recording(NumbersRecordingBody recording) { + this.recording = recording; + return this; + } + + /** + * Returns recording. + * + * @return recording + */ + @JsonProperty("recording") + public NumbersRecordingBody getRecording() { + return recording; + } + + /** + * Sets recording. + * + * @param recording + */ + @JsonProperty("recording") + public void setRecording(NumbersRecordingBody recording) { + this.recording = recording; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNumberConfigurationModel numbersNumberConfigurationModel = (NumbersNumberConfigurationModel) o; + return Objects.equals(this.numberKey, numbersNumberConfigurationModel.numberKey) + && Objects.equals(this.recording, numbersNumberConfigurationModel.recording); + } + + @Override + public int hashCode() { + return Objects.hash(numberKey, recording); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNumberConfigurationModel {") + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" recording: ") + .append(toIndentedString(recording)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPool.java b/src/main/java/com/infobip/model/NumbersNumberPool.java new file mode 100644 index 0000000..88fc370 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPool.java @@ -0,0 +1,257 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The number pool to be used with the campaign. + */ +public class NumbersNumberPool { + + private String numberPoolId; + + private NumbersNumberPoolType numberPoolType; + + private NumbersNumberPoolStatus numberPoolStatus; + + private String nnid; + + private NumbersPolicyType policy; + + /** + * Sets numberPoolId. + *

+ * Field description: + * Registrar ID of number pool + * + * @param numberPoolId + * @return This {@link NumbersNumberPool instance}. + */ + public NumbersNumberPool numberPoolId(String numberPoolId) { + this.numberPoolId = numberPoolId; + return this; + } + + /** + * Returns numberPoolId. + *

+ * Field description: + * Registrar ID of number pool + * + * @return numberPoolId + */ + @JsonProperty("numberPoolId") + public String getNumberPoolId() { + return numberPoolId; + } + + /** + * Sets numberPoolId. + *

+ * Field description: + * Registrar ID of number pool + * + * @param numberPoolId + */ + @JsonProperty("numberPoolId") + public void setNumberPoolId(String numberPoolId) { + this.numberPoolId = numberPoolId; + } + + /** + * Sets numberPoolType. + * + * @param numberPoolType + * @return This {@link NumbersNumberPool instance}. + */ + public NumbersNumberPool numberPoolType(NumbersNumberPoolType numberPoolType) { + this.numberPoolType = numberPoolType; + return this; + } + + /** + * Returns numberPoolType. + * + * @return numberPoolType + */ + @JsonProperty("numberPoolType") + public NumbersNumberPoolType getNumberPoolType() { + return numberPoolType; + } + + /** + * Sets numberPoolType. + * + * @param numberPoolType + */ + @JsonProperty("numberPoolType") + public void setNumberPoolType(NumbersNumberPoolType numberPoolType) { + this.numberPoolType = numberPoolType; + } + + /** + * Sets numberPoolStatus. + * + * @param numberPoolStatus + * @return This {@link NumbersNumberPool instance}. + */ + public NumbersNumberPool numberPoolStatus(NumbersNumberPoolStatus numberPoolStatus) { + this.numberPoolStatus = numberPoolStatus; + return this; + } + + /** + * Returns numberPoolStatus. + * + * @return numberPoolStatus + */ + @JsonProperty("numberPoolStatus") + public NumbersNumberPoolStatus getNumberPoolStatus() { + return numberPoolStatus; + } + + /** + * Sets numberPoolStatus. + * + * @param numberPoolStatus + */ + @JsonProperty("numberPoolStatus") + public void setNumberPoolStatus(NumbersNumberPoolStatus numberPoolStatus) { + this.numberPoolStatus = numberPoolStatus; + } + + /** + * Sets nnid. + *

+ * Field description: + * NNID of number pool + * + * @param nnid + * @return This {@link NumbersNumberPool instance}. + */ + public NumbersNumberPool nnid(String nnid) { + this.nnid = nnid; + return this; + } + + /** + * Returns nnid. + *

+ * Field description: + * NNID of number pool + * + * @return nnid + */ + @JsonProperty("nnid") + public String getNnid() { + return nnid; + } + + /** + * Sets nnid. + *

+ * Field description: + * NNID of number pool + * + * @param nnid + */ + @JsonProperty("nnid") + public void setNnid(String nnid) { + this.nnid = nnid; + } + + /** + * Sets policy. + * + * @param policy + * @return This {@link NumbersNumberPool instance}. + */ + public NumbersNumberPool policy(NumbersPolicyType policy) { + this.policy = policy; + return this; + } + + /** + * Returns policy. + * + * @return policy + */ + @JsonProperty("policy") + public NumbersPolicyType getPolicy() { + return policy; + } + + /** + * Sets policy. + * + * @param policy + */ + @JsonProperty("policy") + public void setPolicy(NumbersPolicyType policy) { + this.policy = policy; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNumberPool numbersNumberPool = (NumbersNumberPool) o; + return Objects.equals(this.numberPoolId, numbersNumberPool.numberPoolId) + && Objects.equals(this.numberPoolType, numbersNumberPool.numberPoolType) + && Objects.equals(this.numberPoolStatus, numbersNumberPool.numberPoolStatus) + && Objects.equals(this.nnid, numbersNumberPool.nnid) + && Objects.equals(this.policy, numbersNumberPool.policy); + } + + @Override + public int hashCode() { + return Objects.hash(numberPoolId, numberPoolType, numberPoolStatus, nnid, policy); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNumberPool {") + .append(newLine) + .append(" numberPoolId: ") + .append(toIndentedString(numberPoolId)) + .append(newLine) + .append(" numberPoolType: ") + .append(toIndentedString(numberPoolType)) + .append(newLine) + .append(" numberPoolStatus: ") + .append(toIndentedString(numberPoolStatus)) + .append(newLine) + .append(" nnid: ") + .append(toIndentedString(nnid)) + .append(newLine) + .append(" policy: ") + .append(toIndentedString(policy)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPoolAvailability.java b/src/main/java/com/infobip/model/NumbersNumberPoolAvailability.java new file mode 100644 index 0000000..d17951f --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPoolAvailability.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersNumberPoolAvailability enumeration. + */ +public enum NumbersNumberPoolAvailability { + AVAILABLE("AVAILABLE"), + IN_USE("IN_USE"); + + private final String value; + + NumbersNumberPoolAvailability(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersNumberPoolAvailability fromValue(String value) { + for (NumbersNumberPoolAvailability enumElement : NumbersNumberPoolAvailability.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPoolStatus.java b/src/main/java/com/infobip/model/NumbersNumberPoolStatus.java new file mode 100644 index 0000000..f03172c --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPoolStatus.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersNumberPoolStatus enumeration. + */ +public enum NumbersNumberPoolStatus { + PENDING_VERIFICATION("PENDING_VERIFICATION"), + SUBMITTED_FOR_VERIFICATION("SUBMITTED_FOR_VERIFICATION"), + VALID("VALID"), + INVALID("INVALID"); + + private final String value; + + NumbersNumberPoolStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersNumberPoolStatus fromValue(String value) { + for (NumbersNumberPoolStatus enumElement : NumbersNumberPoolStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPoolType.java b/src/main/java/com/infobip/model/NumbersNumberPoolType.java new file mode 100644 index 0000000..e5ffe85 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPoolType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersNumberPoolType enumeration. + */ +public enum NumbersNumberPoolType { + SUB_ID("SUB_ID"), + CAMPAIGN_ID("CAMPAIGN_ID"); + + private final String value; + + NumbersNumberPoolType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersNumberPoolType fromValue(String value) { + for (NumbersNumberPoolType enumElement : NumbersNumberPoolType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPoolUsageApiPageResponse.java b/src/main/java/com/infobip/model/NumbersNumberPoolUsageApiPageResponse.java new file mode 100644 index 0000000..85ffc28 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPoolUsageApiPageResponse.java @@ -0,0 +1,157 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersNumberPoolUsageApiPageResponse model. + */ +public class NumbersNumberPoolUsageApiPageResponse { + + private List results = null; + + private PageInfo paging; + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + * @return This {@link NumbersNumberPoolUsageApiPageResponse instance}. + */ + public NumbersNumberPoolUsageApiPageResponse results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * The list of the results for this page. + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersNumberPoolUsageApiPageResponse instance}. + */ + public NumbersNumberPoolUsageApiPageResponse addResultsItem(NumbersNumberPoolUsageApiResponse resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * The list of the results for this page. + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + /** + * Sets paging. + * + * @param paging + * @return This {@link NumbersNumberPoolUsageApiPageResponse instance}. + */ + public NumbersNumberPoolUsageApiPageResponse paging(PageInfo paging) { + this.paging = paging; + return this; + } + + /** + * Returns paging. + * + * @return paging + */ + @JsonProperty("paging") + public PageInfo getPaging() { + return paging; + } + + /** + * Sets paging. + * + * @param paging + */ + @JsonProperty("paging") + public void setPaging(PageInfo paging) { + this.paging = paging; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNumberPoolUsageApiPageResponse numbersNumberPoolUsageApiPageResponse = + (NumbersNumberPoolUsageApiPageResponse) o; + return Objects.equals(this.results, numbersNumberPoolUsageApiPageResponse.results) + && Objects.equals(this.paging, numbersNumberPoolUsageApiPageResponse.paging); + } + + @Override + public int hashCode() { + return Objects.hash(results, paging); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNumberPoolUsageApiPageResponse {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append(" paging: ") + .append(toIndentedString(paging)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPoolUsageApiResponse.java b/src/main/java/com/infobip/model/NumbersNumberPoolUsageApiResponse.java new file mode 100644 index 0000000..8eaec80 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPoolUsageApiResponse.java @@ -0,0 +1,192 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The list of the results for this page. + */ +public class NumbersNumberPoolUsageApiResponse { + + private String numberPoolId; + + private String campaignId; + + private String campaignName; + + /** + * Sets numberPoolId. + *

+ * Field description: + * Unique identifier of the number pool. + * + * @param numberPoolId + * @return This {@link NumbersNumberPoolUsageApiResponse instance}. + */ + public NumbersNumberPoolUsageApiResponse numberPoolId(String numberPoolId) { + this.numberPoolId = numberPoolId; + return this; + } + + /** + * Returns numberPoolId. + *

+ * Field description: + * Unique identifier of the number pool. + * + * @return numberPoolId + */ + @JsonProperty("numberPoolId") + public String getNumberPoolId() { + return numberPoolId; + } + + /** + * Sets numberPoolId. + *

+ * Field description: + * Unique identifier of the number pool. + * + * @param numberPoolId + */ + @JsonProperty("numberPoolId") + public void setNumberPoolId(String numberPoolId) { + this.numberPoolId = numberPoolId; + } + + /** + * Sets campaignId. + *

+ * Field description: + * Unique identifier of the campaign currently associated with this number pool. If the number pool is unassigned, this field will be empty. + * + * @param campaignId + * @return This {@link NumbersNumberPoolUsageApiResponse instance}. + */ + public NumbersNumberPoolUsageApiResponse campaignId(String campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * Returns campaignId. + *

+ * Field description: + * Unique identifier of the campaign currently associated with this number pool. If the number pool is unassigned, this field will be empty. + * + * @return campaignId + */ + @JsonProperty("campaignId") + public String getCampaignId() { + return campaignId; + } + + /** + * Sets campaignId. + *

+ * Field description: + * Unique identifier of the campaign currently associated with this number pool. If the number pool is unassigned, this field will be empty. + * + * @param campaignId + */ + @JsonProperty("campaignId") + public void setCampaignId(String campaignId) { + this.campaignId = campaignId; + } + + /** + * Sets campaignName. + *

+ * Field description: + * Name of the associated campaign. Will be empty if no campaign is associated. + * + * @param campaignName + * @return This {@link NumbersNumberPoolUsageApiResponse instance}. + */ + public NumbersNumberPoolUsageApiResponse campaignName(String campaignName) { + this.campaignName = campaignName; + return this; + } + + /** + * Returns campaignName. + *

+ * Field description: + * Name of the associated campaign. Will be empty if no campaign is associated. + * + * @return campaignName + */ + @JsonProperty("campaignName") + public String getCampaignName() { + return campaignName; + } + + /** + * Sets campaignName. + *

+ * Field description: + * Name of the associated campaign. Will be empty if no campaign is associated. + * + * @param campaignName + */ + @JsonProperty("campaignName") + public void setCampaignName(String campaignName) { + this.campaignName = campaignName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNumberPoolUsageApiResponse numbersNumberPoolUsageApiResponse = (NumbersNumberPoolUsageApiResponse) o; + return Objects.equals(this.numberPoolId, numbersNumberPoolUsageApiResponse.numberPoolId) + && Objects.equals(this.campaignId, numbersNumberPoolUsageApiResponse.campaignId) + && Objects.equals(this.campaignName, numbersNumberPoolUsageApiResponse.campaignName); + } + + @Override + public int hashCode() { + return Objects.hash(numberPoolId, campaignId, campaignName); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNumberPoolUsageApiResponse {") + .append(newLine) + .append(" numberPoolId: ") + .append(toIndentedString(numberPoolId)) + .append(newLine) + .append(" campaignId: ") + .append(toIndentedString(campaignId)) + .append(newLine) + .append(" campaignName: ") + .append(toIndentedString(campaignName)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPreview.java b/src/main/java/com/infobip/model/NumbersNumberPreview.java new file mode 100644 index 0000000..73c62f4 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPreview.java @@ -0,0 +1,192 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersNumberPreview model. + */ +public class NumbersNumberPreview { + + private String numberKey; + + private String number; + + private String countryCode; + + /** + * Sets numberKey. + *

+ * Field description: + * Unique ID of the number. + * + * @param numberKey + * @return This {@link NumbersNumberPreview instance}. + */ + public NumbersNumberPreview numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * Unique ID of the number. + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Unique ID of the number. + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets number. + *

+ * Field description: + * Number. + * + * @param number + * @return This {@link NumbersNumberPreview instance}. + */ + public NumbersNumberPreview number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Number. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Number. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Number's country code. + * + * @param countryCode + * @return This {@link NumbersNumberPreview instance}. + */ + public NumbersNumberPreview countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Number's country code. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Number's country code. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNumberPreview numbersNumberPreview = (NumbersNumberPreview) o; + return Objects.equals(this.numberKey, numbersNumberPreview.numberKey) + && Objects.equals(this.number, numbersNumberPreview.number) + && Objects.equals(this.countryCode, numbersNumberPreview.countryCode); + } + + @Override + public int hashCode() { + return Objects.hash(numberKey, number, countryCode); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNumberPreview {") + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPreviews.java b/src/main/java/com/infobip/model/NumbersNumberPreviews.java new file mode 100644 index 0000000..918f681 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPreviews.java @@ -0,0 +1,107 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Represents NumbersNumberPreviews model. + */ +public class NumbersNumberPreviews { + + private Set numberPreviews = null; + + /** + * Sets numberPreviews. + * + * @param numberPreviews + * @return This {@link NumbersNumberPreviews instance}. + */ + public NumbersNumberPreviews numberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + return this; + } + + /** + * Adds and item into numberPreviews. + * + * @param numberPreviewsItem The item to be added to the list. + * @return This {@link NumbersNumberPreviews instance}. + */ + public NumbersNumberPreviews addNumberPreviewsItem(NumbersNumberPreview numberPreviewsItem) { + if (this.numberPreviews == null) { + this.numberPreviews = new LinkedHashSet<>(); + } + this.numberPreviews.add(numberPreviewsItem); + return this; + } + + /** + * Returns numberPreviews. + * + * @return numberPreviews + */ + @JsonProperty("numberPreviews") + public Set getNumberPreviews() { + return numberPreviews; + } + + /** + * Sets numberPreviews. + * + * @param numberPreviews + */ + @JsonProperty("numberPreviews") + public void setNumberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNumberPreviews numbersNumberPreviews = (NumbersNumberPreviews) o; + return Objects.equals(this.numberPreviews, numbersNumberPreviews.numberPreviews); + } + + @Override + public int hashCode() { + return Objects.hash(numberPreviews); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNumberPreviews {") + .append(newLine) + .append(" numberPreviews: ") + .append(toIndentedString(numberPreviews)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberPrice.java b/src/main/java/com/infobip/model/NumbersNumberPrice.java new file mode 100644 index 0000000..2995eda --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberPrice.java @@ -0,0 +1,238 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The price object indicating pricing details for the number. + */ +public class NumbersNumberPrice { + + private Double pricePerMonth; + + private Double setupPrice; + + private Double initialMonthPrice; + + private String currency; + + /** + * Sets pricePerMonth. + *

+ * Field description: + * Price of the monthly fee. + * + * @param pricePerMonth + * @return This {@link NumbersNumberPrice instance}. + */ + public NumbersNumberPrice pricePerMonth(Double pricePerMonth) { + this.pricePerMonth = pricePerMonth; + return this; + } + + /** + * Returns pricePerMonth. + *

+ * Field description: + * Price of the monthly fee. + * + * @return pricePerMonth + */ + @JsonProperty("pricePerMonth") + public Double getPricePerMonth() { + return pricePerMonth; + } + + /** + * Sets pricePerMonth. + *

+ * Field description: + * Price of the monthly fee. + * + * @param pricePerMonth + */ + @JsonProperty("pricePerMonth") + public void setPricePerMonth(Double pricePerMonth) { + this.pricePerMonth = pricePerMonth; + } + + /** + * Sets setupPrice. + *

+ * Field description: + * Price of the setup fee. + * + * @param setupPrice + * @return This {@link NumbersNumberPrice instance}. + */ + public NumbersNumberPrice setupPrice(Double setupPrice) { + this.setupPrice = setupPrice; + return this; + } + + /** + * Returns setupPrice. + *

+ * Field description: + * Price of the setup fee. + * + * @return setupPrice + */ + @JsonProperty("setupPrice") + public Double getSetupPrice() { + return setupPrice; + } + + /** + * Sets setupPrice. + *

+ * Field description: + * Price of the setup fee. + * + * @param setupPrice + */ + @JsonProperty("setupPrice") + public void setSetupPrice(Double setupPrice) { + this.setupPrice = setupPrice; + } + + /** + * Sets initialMonthPrice. + *

+ * Field description: + * Price for the initial month. + * + * @param initialMonthPrice + * @return This {@link NumbersNumberPrice instance}. + */ + public NumbersNumberPrice initialMonthPrice(Double initialMonthPrice) { + this.initialMonthPrice = initialMonthPrice; + return this; + } + + /** + * Returns initialMonthPrice. + *

+ * Field description: + * Price for the initial month. + * + * @return initialMonthPrice + */ + @JsonProperty("initialMonthPrice") + public Double getInitialMonthPrice() { + return initialMonthPrice; + } + + /** + * Sets initialMonthPrice. + *

+ * Field description: + * Price for the initial month. + * + * @param initialMonthPrice + */ + @JsonProperty("initialMonthPrice") + public void setInitialMonthPrice(Double initialMonthPrice) { + this.initialMonthPrice = initialMonthPrice; + } + + /** + * Sets currency. + *

+ * Field description: + * Currency of the number's fees. + * + * @param currency + * @return This {@link NumbersNumberPrice instance}. + */ + public NumbersNumberPrice currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Returns currency. + *

+ * Field description: + * Currency of the number's fees. + * + * @return currency + */ + @JsonProperty("currency") + public String getCurrency() { + return currency; + } + + /** + * Sets currency. + *

+ * Field description: + * Currency of the number's fees. + * + * @param currency + */ + @JsonProperty("currency") + public void setCurrency(String currency) { + this.currency = currency; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNumberPrice numbersNumberPrice = (NumbersNumberPrice) o; + return Objects.equals(this.pricePerMonth, numbersNumberPrice.pricePerMonth) + && Objects.equals(this.setupPrice, numbersNumberPrice.setupPrice) + && Objects.equals(this.initialMonthPrice, numbersNumberPrice.initialMonthPrice) + && Objects.equals(this.currency, numbersNumberPrice.currency); + } + + @Override + public int hashCode() { + return Objects.hash(pricePerMonth, setupPrice, initialMonthPrice, currency); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNumberPrice {") + .append(newLine) + .append(" pricePerMonth: ") + .append(toIndentedString(pricePerMonth)) + .append(newLine) + .append(" setupPrice: ") + .append(toIndentedString(setupPrice)) + .append(newLine) + .append(" initialMonthPrice: ") + .append(toIndentedString(initialMonthPrice)) + .append(newLine) + .append(" currency: ") + .append(toIndentedString(currency)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersNumberResponse.java b/src/main/java/com/infobip/model/NumbersNumberResponse.java new file mode 100644 index 0000000..0855c92 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersNumberResponse.java @@ -0,0 +1,844 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersNumberResponse model. + */ +public class NumbersNumberResponse { + + private String numberKey; + + private String number; + + private String country; + + private String countryName; + + private NumberType type; + + private List capabilities = null; + + private Boolean shared; + + private NumbersNumberPrice price; + + private String network; + + private List keywords = null; + + private NumbersVoiceSetup voiceSetup; + + private NumbersReservationStatus reservationStatus; + + private Boolean additionalSetupRequired; + + private NumbersEditPermissions editPermissions; + + private String note; + + private String applicationId; + + private String entityId; + + /** + * Sets numberKey. + *

+ * Field description: + * Unique ID of a number. + * + * @param numberKey + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * Unique ID of a number. + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Unique ID of a number. + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets number. + *

+ * Field description: + * The number. + * + * @param number + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * The number. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * The number. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets country. + *

+ * Field description: + * Number's country code. + * + * @param country + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse country(String country) { + this.country = country; + return this; + } + + /** + * Returns country. + *

+ * Field description: + * Number's country code. + * + * @return country + */ + @JsonProperty("country") + public String getCountry() { + return country; + } + + /** + * Sets country. + *

+ * Field description: + * Number's country code. + * + * @param country + */ + @JsonProperty("country") + public void setCountry(String country) { + this.country = country; + } + + /** + * Sets countryName. + *

+ * Field description: + * Number's country. + * + * @param countryName + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Number's country. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Number's country. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets type. + * + * @param type + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse type(NumberType type) { + this.type = type; + return this; + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public NumberType getType() { + return type; + } + + /** + * Sets type. + * + * @param type + */ + @JsonProperty("type") + public void setType(NumberType type) { + this.type = type; + } + + /** + * Sets capabilities. + *

+ * Field description: + * An array of communication channels the number can support. + * + * @param capabilities + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse capabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * An array of communication channels the number can support. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse addCapabilitiesItem(NumbersNumberCapabilityType capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new ArrayList<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * An array of communication channels the number can support. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public List getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * An array of communication channels the number can support. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(List capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a number is shared. + * + * @param shared + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse shared(Boolean shared) { + this.shared = shared; + return this; + } + + /** + * Returns shared. + *

+ * Field description: + * Indicates whether a number is shared. + * + * @return shared + */ + @JsonProperty("shared") + public Boolean getShared() { + return shared; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a number is shared. + * + * @param shared + */ + @JsonProperty("shared") + public void setShared(Boolean shared) { + this.shared = shared; + } + + /** + * Sets price. + * + * @param price + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse price(NumbersNumberPrice price) { + this.price = price; + return this; + } + + /** + * Returns price. + * + * @return price + */ + @JsonProperty("price") + public NumbersNumberPrice getPrice() { + return price; + } + + /** + * Sets price. + * + * @param price + */ + @JsonProperty("price") + public void setPrice(NumbersNumberPrice price) { + this.price = price; + } + + /** + * Sets network. + *

+ * Field description: + * Indicates the network that owns the number. + * + * @param network + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse network(String network) { + this.network = network; + return this; + } + + /** + * Returns network. + *

+ * Field description: + * Indicates the network that owns the number. + * + * @return network + */ + @JsonProperty("network") + public String getNetwork() { + return network; + } + + /** + * Sets network. + *

+ * Field description: + * Indicates the network that owns the number. + * + * @param network + */ + @JsonProperty("network") + public void setNetwork(String network) { + this.network = network; + } + + /** + * Sets keywords. + *

+ * Field description: + * Keywords defined for the number. + * + * @param keywords + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse keywords(List keywords) { + this.keywords = keywords; + return this; + } + + /** + * Adds and item into keywords. + *

+ * Field description: + * Keywords defined for the number. + * + * @param keywordsItem The item to be added to the list. + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse addKeywordsItem(String keywordsItem) { + if (this.keywords == null) { + this.keywords = new ArrayList<>(); + } + this.keywords.add(keywordsItem); + return this; + } + + /** + * Returns keywords. + *

+ * Field description: + * Keywords defined for the number. + * + * @return keywords + */ + @JsonProperty("keywords") + public List getKeywords() { + return keywords; + } + + /** + * Sets keywords. + *

+ * Field description: + * Keywords defined for the number. + * + * @param keywords + */ + @JsonProperty("keywords") + public void setKeywords(List keywords) { + this.keywords = keywords; + } + + /** + * Sets voiceSetup. + * + * @param voiceSetup + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse voiceSetup(NumbersVoiceSetup voiceSetup) { + this.voiceSetup = voiceSetup; + return this; + } + + /** + * Returns voiceSetup. + * + * @return voiceSetup + */ + @JsonProperty("voiceSetup") + public NumbersVoiceSetup getVoiceSetup() { + return voiceSetup; + } + + /** + * Sets voiceSetup. + * + * @param voiceSetup + */ + @JsonProperty("voiceSetup") + public void setVoiceSetup(NumbersVoiceSetup voiceSetup) { + this.voiceSetup = voiceSetup; + } + + /** + * Sets reservationStatus. + * + * @param reservationStatus + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse reservationStatus(NumbersReservationStatus reservationStatus) { + this.reservationStatus = reservationStatus; + return this; + } + + /** + * Returns reservationStatus. + * + * @return reservationStatus + */ + @JsonProperty("reservationStatus") + public NumbersReservationStatus getReservationStatus() { + return reservationStatus; + } + + /** + * Sets reservationStatus. + * + * @param reservationStatus + */ + @JsonProperty("reservationStatus") + public void setReservationStatus(NumbersReservationStatus reservationStatus) { + this.reservationStatus = reservationStatus; + } + + /** + * Sets additionalSetupRequired. + *

+ * Field description: + * Indicates whether the number requires additional setup before being used. + * + * @param additionalSetupRequired + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse additionalSetupRequired(Boolean additionalSetupRequired) { + this.additionalSetupRequired = additionalSetupRequired; + return this; + } + + /** + * Returns additionalSetupRequired. + *

+ * Field description: + * Indicates whether the number requires additional setup before being used. + * + * @return additionalSetupRequired + */ + @JsonProperty("additionalSetupRequired") + public Boolean getAdditionalSetupRequired() { + return additionalSetupRequired; + } + + /** + * Sets additionalSetupRequired. + *

+ * Field description: + * Indicates whether the number requires additional setup before being used. + * + * @param additionalSetupRequired + */ + @JsonProperty("additionalSetupRequired") + public void setAdditionalSetupRequired(Boolean additionalSetupRequired) { + this.additionalSetupRequired = additionalSetupRequired; + } + + /** + * Sets editPermissions. + * + * @param editPermissions + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse editPermissions(NumbersEditPermissions editPermissions) { + this.editPermissions = editPermissions; + return this; + } + + /** + * Returns editPermissions. + * + * @return editPermissions + */ + @JsonProperty("editPermissions") + public NumbersEditPermissions getEditPermissions() { + return editPermissions; + } + + /** + * Sets editPermissions. + * + * @param editPermissions + */ + @JsonProperty("editPermissions") + public void setEditPermissions(NumbersEditPermissions editPermissions) { + this.editPermissions = editPermissions; + } + + /** + * Sets note. + *

+ * Field description: + * Additional information attached to the number. Available only for SHORT_CODE and VIRTUAL_LONG_NUMBER number types. + * + * @param note + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse note(String note) { + this.note = note; + return this; + } + + /** + * Returns note. + *

+ * Field description: + * Additional information attached to the number. Available only for SHORT_CODE and VIRTUAL_LONG_NUMBER number types. + * + * @return note + */ + @JsonProperty("note") + public String getNote() { + return note; + } + + /** + * Sets note. + *

+ * Field description: + * Additional information attached to the number. Available only for SHORT_CODE and VIRTUAL_LONG_NUMBER number types. + * + * @param note + */ + @JsonProperty("note") + public void setNote(String note) { + this.note = note; + } + + /** + * Sets applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the number. + * + * @param applicationId + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the number. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the number. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the number. + * + * @param entityId + * @return This {@link NumbersNumberResponse instance}. + */ + public NumbersNumberResponse entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the number. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the number. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersNumberResponse numbersNumberResponse = (NumbersNumberResponse) o; + return Objects.equals(this.numberKey, numbersNumberResponse.numberKey) + && Objects.equals(this.number, numbersNumberResponse.number) + && Objects.equals(this.country, numbersNumberResponse.country) + && Objects.equals(this.countryName, numbersNumberResponse.countryName) + && Objects.equals(this.type, numbersNumberResponse.type) + && Objects.equals(this.capabilities, numbersNumberResponse.capabilities) + && Objects.equals(this.shared, numbersNumberResponse.shared) + && Objects.equals(this.price, numbersNumberResponse.price) + && Objects.equals(this.network, numbersNumberResponse.network) + && Objects.equals(this.keywords, numbersNumberResponse.keywords) + && Objects.equals(this.voiceSetup, numbersNumberResponse.voiceSetup) + && Objects.equals(this.reservationStatus, numbersNumberResponse.reservationStatus) + && Objects.equals(this.additionalSetupRequired, numbersNumberResponse.additionalSetupRequired) + && Objects.equals(this.editPermissions, numbersNumberResponse.editPermissions) + && Objects.equals(this.note, numbersNumberResponse.note) + && Objects.equals(this.applicationId, numbersNumberResponse.applicationId) + && Objects.equals(this.entityId, numbersNumberResponse.entityId); + } + + @Override + public int hashCode() { + return Objects.hash( + numberKey, + number, + country, + countryName, + type, + capabilities, + shared, + price, + network, + keywords, + voiceSetup, + reservationStatus, + additionalSetupRequired, + editPermissions, + note, + applicationId, + entityId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersNumberResponse {") + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" country: ") + .append(toIndentedString(country)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" shared: ") + .append(toIndentedString(shared)) + .append(newLine) + .append(" price: ") + .append(toIndentedString(price)) + .append(newLine) + .append(" network: ") + .append(toIndentedString(network)) + .append(newLine) + .append(" keywords: ") + .append(toIndentedString(keywords)) + .append(newLine) + .append(" voiceSetup: ") + .append(toIndentedString(voiceSetup)) + .append(newLine) + .append(" reservationStatus: ") + .append(toIndentedString(reservationStatus)) + .append(newLine) + .append(" additionalSetupRequired: ") + .append(toIndentedString(additionalSetupRequired)) + .append(newLine) + .append(" editPermissions: ") + .append(toIndentedString(editPermissions)) + .append(newLine) + .append(" note: ") + .append(toIndentedString(note)) + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersOptIns.java b/src/main/java/com/infobip/model/NumbersOptIns.java new file mode 100644 index 0000000..c9ed12c --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersOptIns.java @@ -0,0 +1,202 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersOptIns model. + */ +public class NumbersOptIns { + + private NumbersKeywordOptIn keyword; + + private NumbersWebOptIn web; + + private NumbersVerbalOptIn verbal; + + private NumbersInteractiveVoiceResponseOptIn interactiveVoiceResponse; + + /** + * Sets keyword. + * + * @param keyword + * @return This {@link NumbersOptIns instance}. + */ + public NumbersOptIns keyword(NumbersKeywordOptIn keyword) { + this.keyword = keyword; + return this; + } + + /** + * Returns keyword. + * + * @return keyword + */ + @JsonProperty("keyword") + public NumbersKeywordOptIn getKeyword() { + return keyword; + } + + /** + * Sets keyword. + * + * @param keyword + */ + @JsonProperty("keyword") + public void setKeyword(NumbersKeywordOptIn keyword) { + this.keyword = keyword; + } + + /** + * Sets web. + * + * @param web + * @return This {@link NumbersOptIns instance}. + */ + public NumbersOptIns web(NumbersWebOptIn web) { + this.web = web; + return this; + } + + /** + * Returns web. + * + * @return web + */ + @JsonProperty("web") + public NumbersWebOptIn getWeb() { + return web; + } + + /** + * Sets web. + * + * @param web + */ + @JsonProperty("web") + public void setWeb(NumbersWebOptIn web) { + this.web = web; + } + + /** + * Sets verbal. + * + * @param verbal + * @return This {@link NumbersOptIns instance}. + */ + public NumbersOptIns verbal(NumbersVerbalOptIn verbal) { + this.verbal = verbal; + return this; + } + + /** + * Returns verbal. + * + * @return verbal + */ + @JsonProperty("verbal") + public NumbersVerbalOptIn getVerbal() { + return verbal; + } + + /** + * Sets verbal. + * + * @param verbal + */ + @JsonProperty("verbal") + public void setVerbal(NumbersVerbalOptIn verbal) { + this.verbal = verbal; + } + + /** + * Sets interactiveVoiceResponse. + * + * @param interactiveVoiceResponse + * @return This {@link NumbersOptIns instance}. + */ + public NumbersOptIns interactiveVoiceResponse(NumbersInteractiveVoiceResponseOptIn interactiveVoiceResponse) { + this.interactiveVoiceResponse = interactiveVoiceResponse; + return this; + } + + /** + * Returns interactiveVoiceResponse. + * + * @return interactiveVoiceResponse + */ + @JsonProperty("interactiveVoiceResponse") + public NumbersInteractiveVoiceResponseOptIn getInteractiveVoiceResponse() { + return interactiveVoiceResponse; + } + + /** + * Sets interactiveVoiceResponse. + * + * @param interactiveVoiceResponse + */ + @JsonProperty("interactiveVoiceResponse") + public void setInteractiveVoiceResponse(NumbersInteractiveVoiceResponseOptIn interactiveVoiceResponse) { + this.interactiveVoiceResponse = interactiveVoiceResponse; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersOptIns numbersOptIns = (NumbersOptIns) o; + return Objects.equals(this.keyword, numbersOptIns.keyword) + && Objects.equals(this.web, numbersOptIns.web) + && Objects.equals(this.verbal, numbersOptIns.verbal) + && Objects.equals(this.interactiveVoiceResponse, numbersOptIns.interactiveVoiceResponse); + } + + @Override + public int hashCode() { + return Objects.hash(keyword, web, verbal, interactiveVoiceResponse); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersOptIns {") + .append(newLine) + .append(" keyword: ") + .append(toIndentedString(keyword)) + .append(newLine) + .append(" web: ") + .append(toIndentedString(web)) + .append(newLine) + .append(" verbal: ") + .append(toIndentedString(verbal)) + .append(newLine) + .append(" interactiveVoiceResponse: ") + .append(toIndentedString(interactiveVoiceResponse)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPageResponseBrand.java b/src/main/java/com/infobip/model/NumbersPageResponseBrand.java new file mode 100644 index 0000000..0e9942e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPageResponseBrand.java @@ -0,0 +1,156 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersPageResponseBrand model. + */ +public class NumbersPageResponseBrand { + + private List results = null; + + private PageInfo paging; + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + * @return This {@link NumbersPageResponseBrand instance}. + */ + public NumbersPageResponseBrand results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * The list of the results for this page. + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersPageResponseBrand instance}. + */ + public NumbersPageResponseBrand addResultsItem(NumbersBrand resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * The list of the results for this page. + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + /** + * Sets paging. + * + * @param paging + * @return This {@link NumbersPageResponseBrand instance}. + */ + public NumbersPageResponseBrand paging(PageInfo paging) { + this.paging = paging; + return this; + } + + /** + * Returns paging. + * + * @return paging + */ + @JsonProperty("paging") + public PageInfo getPaging() { + return paging; + } + + /** + * Sets paging. + * + * @param paging + */ + @JsonProperty("paging") + public void setPaging(PageInfo paging) { + this.paging = paging; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersPageResponseBrand numbersPageResponseBrand = (NumbersPageResponseBrand) o; + return Objects.equals(this.results, numbersPageResponseBrand.results) + && Objects.equals(this.paging, numbersPageResponseBrand.paging); + } + + @Override + public int hashCode() { + return Objects.hash(results, paging); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersPageResponseBrand {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append(" paging: ") + .append(toIndentedString(paging)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPageResponseBrandVet.java b/src/main/java/com/infobip/model/NumbersPageResponseBrandVet.java new file mode 100644 index 0000000..0858d9b --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPageResponseBrandVet.java @@ -0,0 +1,156 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersPageResponseBrandVet model. + */ +public class NumbersPageResponseBrandVet { + + private List results = null; + + private PageInfo paging; + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + * @return This {@link NumbersPageResponseBrandVet instance}. + */ + public NumbersPageResponseBrandVet results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * The list of the results for this page. + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersPageResponseBrandVet instance}. + */ + public NumbersPageResponseBrandVet addResultsItem(NumbersBrandVet resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * The list of the results for this page. + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + /** + * Sets paging. + * + * @param paging + * @return This {@link NumbersPageResponseBrandVet instance}. + */ + public NumbersPageResponseBrandVet paging(PageInfo paging) { + this.paging = paging; + return this; + } + + /** + * Returns paging. + * + * @return paging + */ + @JsonProperty("paging") + public PageInfo getPaging() { + return paging; + } + + /** + * Sets paging. + * + * @param paging + */ + @JsonProperty("paging") + public void setPaging(PageInfo paging) { + this.paging = paging; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersPageResponseBrandVet numbersPageResponseBrandVet = (NumbersPageResponseBrandVet) o; + return Objects.equals(this.results, numbersPageResponseBrandVet.results) + && Objects.equals(this.paging, numbersPageResponseBrandVet.paging); + } + + @Override + public int hashCode() { + return Objects.hash(results, paging); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersPageResponseBrandVet {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append(" paging: ") + .append(toIndentedString(paging)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPageResponseCampaign.java b/src/main/java/com/infobip/model/NumbersPageResponseCampaign.java new file mode 100644 index 0000000..5e8747e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPageResponseCampaign.java @@ -0,0 +1,156 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersPageResponseCampaign model. + */ +public class NumbersPageResponseCampaign { + + private List results = null; + + private PageInfo paging; + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + * @return This {@link NumbersPageResponseCampaign instance}. + */ + public NumbersPageResponseCampaign results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * The list of the results for this page. + * + * @param resultsItem The item to be added to the list. + * @return This {@link NumbersPageResponseCampaign instance}. + */ + public NumbersPageResponseCampaign addResultsItem(NumbersCampaign resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * The list of the results for this page. + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + /** + * Sets paging. + * + * @param paging + * @return This {@link NumbersPageResponseCampaign instance}. + */ + public NumbersPageResponseCampaign paging(PageInfo paging) { + this.paging = paging; + return this; + } + + /** + * Returns paging. + * + * @return paging + */ + @JsonProperty("paging") + public PageInfo getPaging() { + return paging; + } + + /** + * Sets paging. + * + * @param paging + */ + @JsonProperty("paging") + public void setPaging(PageInfo paging) { + this.paging = paging; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersPageResponseCampaign numbersPageResponseCampaign = (NumbersPageResponseCampaign) o; + return Objects.equals(this.results, numbersPageResponseCampaign.results) + && Objects.equals(this.paging, numbersPageResponseCampaign.paging); + } + + @Override + public int hashCode() { + return Objects.hash(results, paging); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersPageResponseCampaign {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append(" paging: ") + .append(toIndentedString(paging)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPolicyType.java b/src/main/java/com/infobip/model/NumbersPolicyType.java new file mode 100644 index 0000000..0499db4 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPolicyType.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Policy type + */ +public enum NumbersPolicyType { + STANDARD("STANDARD"), + REDUCED("REDUCED"), + M2M("M2M"); + + private final String value; + + NumbersPolicyType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersPolicyType fromValue(String value) { + for (NumbersPolicyType enumElement : NumbersPolicyType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPriority.java b/src/main/java/com/infobip/model/NumbersPriority.java new file mode 100644 index 0000000..b6a709b --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPriority.java @@ -0,0 +1,221 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents NumbersPriority model. + */ +public class NumbersPriority { + + private UUID priorityId; + + private Integer dailySubmitLimit; + + private NumbersPriorityTimeData reviewTime; + + private NumbersPriorityType priorityType; + + /** + * Sets priorityId. + *

+ * Field description: + * The ID for the campaign priority. + * + * @param priorityId + * @return This {@link NumbersPriority instance}. + */ + public NumbersPriority priorityId(UUID priorityId) { + this.priorityId = priorityId; + return this; + } + + /** + * Returns priorityId. + *

+ * Field description: + * The ID for the campaign priority. + * + * @return priorityId + */ + @JsonProperty("priorityId") + public UUID getPriorityId() { + return priorityId; + } + + /** + * Sets priorityId. + *

+ * Field description: + * The ID for the campaign priority. + * + * @param priorityId + */ + @JsonProperty("priorityId") + public void setPriorityId(UUID priorityId) { + this.priorityId = priorityId; + } + + /** + * Sets dailySubmitLimit. + *

+ * Field description: + * The limit on how many campaigns you can submit a day with this priority. + * + * @param dailySubmitLimit + * @return This {@link NumbersPriority instance}. + */ + public NumbersPriority dailySubmitLimit(Integer dailySubmitLimit) { + this.dailySubmitLimit = dailySubmitLimit; + return this; + } + + /** + * Returns dailySubmitLimit. + *

+ * Field description: + * The limit on how many campaigns you can submit a day with this priority. + * + * @return dailySubmitLimit + */ + @JsonProperty("dailySubmitLimit") + public Integer getDailySubmitLimit() { + return dailySubmitLimit; + } + + /** + * Sets dailySubmitLimit. + *

+ * Field description: + * The limit on how many campaigns you can submit a day with this priority. + * + * @param dailySubmitLimit + */ + @JsonProperty("dailySubmitLimit") + public void setDailySubmitLimit(Integer dailySubmitLimit) { + this.dailySubmitLimit = dailySubmitLimit; + } + + /** + * Sets reviewTime. + * + * @param reviewTime + * @return This {@link NumbersPriority instance}. + */ + public NumbersPriority reviewTime(NumbersPriorityTimeData reviewTime) { + this.reviewTime = reviewTime; + return this; + } + + /** + * Returns reviewTime. + * + * @return reviewTime + */ + @JsonProperty("reviewTime") + public NumbersPriorityTimeData getReviewTime() { + return reviewTime; + } + + /** + * Sets reviewTime. + * + * @param reviewTime + */ + @JsonProperty("reviewTime") + public void setReviewTime(NumbersPriorityTimeData reviewTime) { + this.reviewTime = reviewTime; + } + + /** + * Sets priorityType. + * + * @param priorityType + * @return This {@link NumbersPriority instance}. + */ + public NumbersPriority priorityType(NumbersPriorityType priorityType) { + this.priorityType = priorityType; + return this; + } + + /** + * Returns priorityType. + * + * @return priorityType + */ + @JsonProperty("priorityType") + public NumbersPriorityType getPriorityType() { + return priorityType; + } + + /** + * Sets priorityType. + * + * @param priorityType + */ + @JsonProperty("priorityType") + public void setPriorityType(NumbersPriorityType priorityType) { + this.priorityType = priorityType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersPriority numbersPriority = (NumbersPriority) o; + return Objects.equals(this.priorityId, numbersPriority.priorityId) + && Objects.equals(this.dailySubmitLimit, numbersPriority.dailySubmitLimit) + && Objects.equals(this.reviewTime, numbersPriority.reviewTime) + && Objects.equals(this.priorityType, numbersPriority.priorityType); + } + + @Override + public int hashCode() { + return Objects.hash(priorityId, dailySubmitLimit, reviewTime, priorityType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersPriority {") + .append(newLine) + .append(" priorityId: ") + .append(toIndentedString(priorityId)) + .append(newLine) + .append(" dailySubmitLimit: ") + .append(toIndentedString(dailySubmitLimit)) + .append(newLine) + .append(" reviewTime: ") + .append(toIndentedString(reviewTime)) + .append(newLine) + .append(" priorityType: ") + .append(toIndentedString(priorityType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPriorityInfo.java b/src/main/java/com/infobip/model/NumbersPriorityInfo.java new file mode 100644 index 0000000..7375c17 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPriorityInfo.java @@ -0,0 +1,148 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.UUID; + +/** + * Priority information used in latest campaign review. + */ +public class NumbersPriorityInfo { + + private UUID priorityId; + + private OffsetDateTime submittedDate; + + /** + * Sets priorityId. + *

+ * Field description: + * Id of a priority + * + * @param priorityId + * @return This {@link NumbersPriorityInfo instance}. + */ + public NumbersPriorityInfo priorityId(UUID priorityId) { + this.priorityId = priorityId; + return this; + } + + /** + * Returns priorityId. + *

+ * Field description: + * Id of a priority + * + * @return priorityId + */ + @JsonProperty("priorityId") + public UUID getPriorityId() { + return priorityId; + } + + /** + * Sets priorityId. + *

+ * Field description: + * Id of a priority + * + * @param priorityId + */ + @JsonProperty("priorityId") + public void setPriorityId(UUID priorityId) { + this.priorityId = priorityId; + } + + /** + * Sets submittedDate. + *

+ * Field description: + * Date submitted for review + * + * @param submittedDate + * @return This {@link NumbersPriorityInfo instance}. + */ + public NumbersPriorityInfo submittedDate(OffsetDateTime submittedDate) { + this.submittedDate = submittedDate; + return this; + } + + /** + * Returns submittedDate. + *

+ * Field description: + * Date submitted for review + * + * @return submittedDate + */ + @JsonProperty("submittedDate") + public OffsetDateTime getSubmittedDate() { + return submittedDate; + } + + /** + * Sets submittedDate. + *

+ * Field description: + * Date submitted for review + * + * @param submittedDate + */ + @JsonProperty("submittedDate") + public void setSubmittedDate(OffsetDateTime submittedDate) { + this.submittedDate = submittedDate; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersPriorityInfo numbersPriorityInfo = (NumbersPriorityInfo) o; + return Objects.equals(this.priorityId, numbersPriorityInfo.priorityId) + && Objects.equals(this.submittedDate, numbersPriorityInfo.submittedDate); + } + + @Override + public int hashCode() { + return Objects.hash(priorityId, submittedDate); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersPriorityInfo {") + .append(newLine) + .append(" priorityId: ") + .append(toIndentedString(priorityId)) + .append(newLine) + .append(" submittedDate: ") + .append(toIndentedString(submittedDate)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPriorityTimeData.java b/src/main/java/com/infobip/model/NumbersPriorityTimeData.java new file mode 100644 index 0000000..4774f91 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPriorityTimeData.java @@ -0,0 +1,137 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersPriorityTimeData model. + */ +public class NumbersPriorityTimeData { + + private NumbersPriorityTimeUnit timeUnit; + + private Integer amount; + + /** + * Sets timeUnit. + * + * @param timeUnit + * @return This {@link NumbersPriorityTimeData instance}. + */ + public NumbersPriorityTimeData timeUnit(NumbersPriorityTimeUnit timeUnit) { + this.timeUnit = timeUnit; + return this; + } + + /** + * Returns timeUnit. + * + * @return timeUnit + */ + @JsonProperty("timeUnit") + public NumbersPriorityTimeUnit getTimeUnit() { + return timeUnit; + } + + /** + * Sets timeUnit. + * + * @param timeUnit + */ + @JsonProperty("timeUnit") + public void setTimeUnit(NumbersPriorityTimeUnit timeUnit) { + this.timeUnit = timeUnit; + } + + /** + * Sets amount. + *

+ * Field description: + * The amount of time unit. + * + * @param amount + * @return This {@link NumbersPriorityTimeData instance}. + */ + public NumbersPriorityTimeData amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Returns amount. + *

+ * Field description: + * The amount of time unit. + * + * @return amount + */ + @JsonProperty("amount") + public Integer getAmount() { + return amount; + } + + /** + * Sets amount. + *

+ * Field description: + * The amount of time unit. + * + * @param amount + */ + @JsonProperty("amount") + public void setAmount(Integer amount) { + this.amount = amount; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersPriorityTimeData numbersPriorityTimeData = (NumbersPriorityTimeData) o; + return Objects.equals(this.timeUnit, numbersPriorityTimeData.timeUnit) + && Objects.equals(this.amount, numbersPriorityTimeData.amount); + } + + @Override + public int hashCode() { + return Objects.hash(timeUnit, amount); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersPriorityTimeData {") + .append(newLine) + .append(" timeUnit: ") + .append(toIndentedString(timeUnit)) + .append(newLine) + .append(" amount: ") + .append(toIndentedString(amount)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPriorityTimeUnit.java b/src/main/java/com/infobip/model/NumbersPriorityTimeUnit.java new file mode 100644 index 0000000..47f00d6 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPriorityTimeUnit.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The unit of time for the priority request. + */ +public enum NumbersPriorityTimeUnit { + HOURS("HOURS"), + DAYS("DAYS"); + + private final String value; + + NumbersPriorityTimeUnit(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersPriorityTimeUnit fromValue(String value) { + for (NumbersPriorityTimeUnit enumElement : NumbersPriorityTimeUnit.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPriorityType.java b/src/main/java/com/infobip/model/NumbersPriorityType.java new file mode 100644 index 0000000..ef91349 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPriorityType.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of a priority + */ +public enum NumbersPriorityType { + TEN_DLC("TEN_DLC"), + SHORT_CODE("SHORT_CODE"), + TFN("TFN"); + + private final String value; + + NumbersPriorityType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersPriorityType fromValue(String value) { + for (NumbersPriorityType enumElement : NumbersPriorityType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPrivateCompanyBrand.java b/src/main/java/com/infobip/model/NumbersPrivateCompanyBrand.java new file mode 100644 index 0000000..69c3b73 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPrivateCompanyBrand.java @@ -0,0 +1,692 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersPrivateCompanyBrand model. + */ +public class NumbersPrivateCompanyBrand extends NumbersBrand { + + private String referenceId; + + private NumbersAddress address; + + private String countryCode; + + private String supportPhone; + + private String supportEmail; + + private String businessContactFirstName; + + private String businessContactLastName; + + private String businessDBA; + + private String legalName; + + private NumbersBusinessIdentifier alternateBusinessId; + + private NumbersVertical vertical; + + private String taxId; + + private String taxIdIssuingCountry; + + /** + * Constructs a new {@link NumbersPrivateCompanyBrand} instance. + */ + public NumbersPrivateCompanyBrand() { + super("TENDLC_PRIVATE_COMPANY"); + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Returns referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @return referenceId + */ + @JsonProperty("referenceId") + public String getReferenceId() { + return referenceId; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + */ + @JsonProperty("referenceId") + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand address(NumbersAddress address) { + this.address = address; + return this; + } + + /** + * Returns address. + *

+ * The field is required. + * + * @return address + */ + @JsonProperty("address") + public NumbersAddress getAddress() { + return address; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + */ + @JsonProperty("address") + public void setAddress(NumbersAddress address) { + this.address = address; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand supportPhone(String supportPhone) { + this.supportPhone = supportPhone; + return this; + } + + /** + * Returns supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @return supportPhone + */ + @JsonProperty("supportPhone") + public String getSupportPhone() { + return supportPhone; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + */ + @JsonProperty("supportPhone") + public void setSupportPhone(String supportPhone) { + this.supportPhone = supportPhone; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand supportEmail(String supportEmail) { + this.supportEmail = supportEmail; + return this; + } + + /** + * Returns supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return supportEmail + */ + @JsonProperty("supportEmail") + public String getSupportEmail() { + return supportEmail; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + */ + @JsonProperty("supportEmail") + public void setSupportEmail(String supportEmail) { + this.supportEmail = supportEmail; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @param businessContactFirstName + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand businessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + return this; + } + + /** + * Returns businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @return businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public String getBusinessContactFirstName() { + return businessContactFirstName; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @param businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public void setBusinessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @param businessContactLastName + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand businessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + return this; + } + + /** + * Returns businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @return businessContactLastName + */ + @JsonProperty("businessContactLastName") + public String getBusinessContactLastName() { + return businessContactLastName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @param businessContactLastName + */ + @JsonProperty("businessContactLastName") + public void setBusinessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand businessDBA(String businessDBA) { + this.businessDBA = businessDBA; + return this; + } + + /** + * Returns businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @return businessDBA + */ + @JsonProperty("businessDBA") + public String getBusinessDBA() { + return businessDBA; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + */ + @JsonProperty("businessDBA") + public void setBusinessDBA(String businessDBA) { + this.businessDBA = businessDBA; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand legalName(String legalName) { + this.legalName = legalName; + return this; + } + + /** + * Returns legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @return legalName + */ + @JsonProperty("legalName") + public String getLegalName() { + return legalName; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + */ + @JsonProperty("legalName") + public void setLegalName(String legalName) { + this.legalName = legalName; + } + + /** + * Sets alternateBusinessId. + * + * @param alternateBusinessId + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand alternateBusinessId(NumbersBusinessIdentifier alternateBusinessId) { + this.alternateBusinessId = alternateBusinessId; + return this; + } + + /** + * Returns alternateBusinessId. + * + * @return alternateBusinessId + */ + @JsonProperty("alternateBusinessId") + public NumbersBusinessIdentifier getAlternateBusinessId() { + return alternateBusinessId; + } + + /** + * Sets alternateBusinessId. + * + * @param alternateBusinessId + */ + @JsonProperty("alternateBusinessId") + public void setAlternateBusinessId(NumbersBusinessIdentifier alternateBusinessId) { + this.alternateBusinessId = alternateBusinessId; + } + + /** + * Sets vertical. + *

+ * The field is required. + * + * @param vertical + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand vertical(NumbersVertical vertical) { + this.vertical = vertical; + return this; + } + + /** + * Returns vertical. + *

+ * The field is required. + * + * @return vertical + */ + @JsonProperty("vertical") + public NumbersVertical getVertical() { + return vertical; + } + + /** + * Sets vertical. + *

+ * The field is required. + * + * @param vertical + */ + @JsonProperty("vertical") + public void setVertical(NumbersVertical vertical) { + this.vertical = vertical; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Returns taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @return taxId + */ + @JsonProperty("taxId") + public String getTaxId() { + return taxId; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + */ + @JsonProperty("taxId") + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + * @return This {@link NumbersPrivateCompanyBrand instance}. + */ + public NumbersPrivateCompanyBrand taxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + return this; + } + + /** + * Returns taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @return taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public String getTaxIdIssuingCountry() { + return taxIdIssuingCountry; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public void setTaxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersPrivateCompanyBrand numbersPrivateCompanyBrand = (NumbersPrivateCompanyBrand) o; + return Objects.equals(this.referenceId, numbersPrivateCompanyBrand.referenceId) + && Objects.equals(this.address, numbersPrivateCompanyBrand.address) + && Objects.equals(this.countryCode, numbersPrivateCompanyBrand.countryCode) + && Objects.equals(this.supportPhone, numbersPrivateCompanyBrand.supportPhone) + && Objects.equals(this.supportEmail, numbersPrivateCompanyBrand.supportEmail) + && Objects.equals(this.businessContactFirstName, numbersPrivateCompanyBrand.businessContactFirstName) + && Objects.equals(this.businessContactLastName, numbersPrivateCompanyBrand.businessContactLastName) + && Objects.equals(this.businessDBA, numbersPrivateCompanyBrand.businessDBA) + && Objects.equals(this.legalName, numbersPrivateCompanyBrand.legalName) + && Objects.equals(this.alternateBusinessId, numbersPrivateCompanyBrand.alternateBusinessId) + && Objects.equals(this.vertical, numbersPrivateCompanyBrand.vertical) + && Objects.equals(this.taxId, numbersPrivateCompanyBrand.taxId) + && Objects.equals(this.taxIdIssuingCountry, numbersPrivateCompanyBrand.taxIdIssuingCountry) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + referenceId, + address, + countryCode, + supportPhone, + supportEmail, + businessContactFirstName, + businessContactLastName, + businessDBA, + legalName, + alternateBusinessId, + vertical, + taxId, + taxIdIssuingCountry, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersPrivateCompanyBrand {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" referenceId: ") + .append(toIndentedString(referenceId)) + .append(newLine) + .append(" address: ") + .append(toIndentedString(address)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" supportPhone: ") + .append(toIndentedString(supportPhone)) + .append(newLine) + .append(" supportEmail: ") + .append(toIndentedString(supportEmail)) + .append(newLine) + .append(" businessContactFirstName: ") + .append(toIndentedString(businessContactFirstName)) + .append(newLine) + .append(" businessContactLastName: ") + .append(toIndentedString(businessContactLastName)) + .append(newLine) + .append(" businessDBA: ") + .append(toIndentedString(businessDBA)) + .append(newLine) + .append(" legalName: ") + .append(toIndentedString(legalName)) + .append(newLine) + .append(" alternateBusinessId: ") + .append(toIndentedString(alternateBusinessId)) + .append(newLine) + .append(" vertical: ") + .append(toIndentedString(vertical)) + .append(newLine) + .append(" taxId: ") + .append(toIndentedString(taxId)) + .append(newLine) + .append(" taxIdIssuingCountry: ") + .append(toIndentedString(taxIdIssuingCountry)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersPublicCompanyBrand.java b/src/main/java/com/infobip/model/NumbersPublicCompanyBrand.java new file mode 100644 index 0000000..751a75f --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersPublicCompanyBrand.java @@ -0,0 +1,842 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersPublicCompanyBrand model. + */ +public class NumbersPublicCompanyBrand extends NumbersBrand { + + private String referenceId; + + private NumbersAddress address; + + private String countryCode; + + private String supportPhone; + + private String supportEmail; + + private String businessContactFirstName; + + private String businessContactLastName; + + private String businessDBA; + + private String legalName; + + private NumbersBusinessIdentifier alternateBusinessId; + + private NumbersVertical vertical; + + private String taxId; + + private String taxIdIssuingCountry; + + private NumbersStockExchange stockExchange; + + private String stockSymbol; + + private String businessContactEmail; + + /** + * Constructs a new {@link NumbersPublicCompanyBrand} instance. + */ + public NumbersPublicCompanyBrand() { + super("TENDLC_PUBLIC_COMPANY"); + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Returns referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @return referenceId + */ + @JsonProperty("referenceId") + public String getReferenceId() { + return referenceId; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + */ + @JsonProperty("referenceId") + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand address(NumbersAddress address) { + this.address = address; + return this; + } + + /** + * Returns address. + *

+ * The field is required. + * + * @return address + */ + @JsonProperty("address") + public NumbersAddress getAddress() { + return address; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + */ + @JsonProperty("address") + public void setAddress(NumbersAddress address) { + this.address = address; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand supportPhone(String supportPhone) { + this.supportPhone = supportPhone; + return this; + } + + /** + * Returns supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @return supportPhone + */ + @JsonProperty("supportPhone") + public String getSupportPhone() { + return supportPhone; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + */ + @JsonProperty("supportPhone") + public void setSupportPhone(String supportPhone) { + this.supportPhone = supportPhone; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand supportEmail(String supportEmail) { + this.supportEmail = supportEmail; + return this; + } + + /** + * Returns supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return supportEmail + */ + @JsonProperty("supportEmail") + public String getSupportEmail() { + return supportEmail; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + */ + @JsonProperty("supportEmail") + public void setSupportEmail(String supportEmail) { + this.supportEmail = supportEmail; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @param businessContactFirstName + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand businessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + return this; + } + + /** + * Returns businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @return businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public String getBusinessContactFirstName() { + return businessContactFirstName; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + * + * @param businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public void setBusinessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @param businessContactLastName + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand businessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + return this; + } + + /** + * Returns businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @return businessContactLastName + */ + @JsonProperty("businessContactLastName") + public String getBusinessContactLastName() { + return businessContactLastName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + * + * @param businessContactLastName + */ + @JsonProperty("businessContactLastName") + public void setBusinessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand businessDBA(String businessDBA) { + this.businessDBA = businessDBA; + return this; + } + + /** + * Returns businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @return businessDBA + */ + @JsonProperty("businessDBA") + public String getBusinessDBA() { + return businessDBA; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + */ + @JsonProperty("businessDBA") + public void setBusinessDBA(String businessDBA) { + this.businessDBA = businessDBA; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand legalName(String legalName) { + this.legalName = legalName; + return this; + } + + /** + * Returns legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @return legalName + */ + @JsonProperty("legalName") + public String getLegalName() { + return legalName; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + */ + @JsonProperty("legalName") + public void setLegalName(String legalName) { + this.legalName = legalName; + } + + /** + * Sets alternateBusinessId. + * + * @param alternateBusinessId + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand alternateBusinessId(NumbersBusinessIdentifier alternateBusinessId) { + this.alternateBusinessId = alternateBusinessId; + return this; + } + + /** + * Returns alternateBusinessId. + * + * @return alternateBusinessId + */ + @JsonProperty("alternateBusinessId") + public NumbersBusinessIdentifier getAlternateBusinessId() { + return alternateBusinessId; + } + + /** + * Sets alternateBusinessId. + * + * @param alternateBusinessId + */ + @JsonProperty("alternateBusinessId") + public void setAlternateBusinessId(NumbersBusinessIdentifier alternateBusinessId) { + this.alternateBusinessId = alternateBusinessId; + } + + /** + * Sets vertical. + *

+ * The field is required. + * + * @param vertical + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand vertical(NumbersVertical vertical) { + this.vertical = vertical; + return this; + } + + /** + * Returns vertical. + *

+ * The field is required. + * + * @return vertical + */ + @JsonProperty("vertical") + public NumbersVertical getVertical() { + return vertical; + } + + /** + * Sets vertical. + *

+ * The field is required. + * + * @param vertical + */ + @JsonProperty("vertical") + public void setVertical(NumbersVertical vertical) { + this.vertical = vertical; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Returns taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @return taxId + */ + @JsonProperty("taxId") + public String getTaxId() { + return taxId; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + */ + @JsonProperty("taxId") + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand taxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + return this; + } + + /** + * Returns taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @return taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public String getTaxIdIssuingCountry() { + return taxIdIssuingCountry; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public void setTaxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + } + + /** + * Sets stockExchange. + *

+ * The field is required. + * + * @param stockExchange + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand stockExchange(NumbersStockExchange stockExchange) { + this.stockExchange = stockExchange; + return this; + } + + /** + * Returns stockExchange. + *

+ * The field is required. + * + * @return stockExchange + */ + @JsonProperty("stockExchange") + public NumbersStockExchange getStockExchange() { + return stockExchange; + } + + /** + * Sets stockExchange. + *

+ * The field is required. + * + * @param stockExchange + */ + @JsonProperty("stockExchange") + public void setStockExchange(NumbersStockExchange stockExchange) { + this.stockExchange = stockExchange; + } + + /** + * Sets stockSymbol. + *

+ * Field description: + * The ticker symbol for the brand on the exchange where it is listed. + *

+ * The field is required. + * + * @param stockSymbol + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand stockSymbol(String stockSymbol) { + this.stockSymbol = stockSymbol; + return this; + } + + /** + * Returns stockSymbol. + *

+ * Field description: + * The ticker symbol for the brand on the exchange where it is listed. + *

+ * The field is required. + * + * @return stockSymbol + */ + @JsonProperty("stockSymbol") + public String getStockSymbol() { + return stockSymbol; + } + + /** + * Sets stockSymbol. + *

+ * Field description: + * The ticker symbol for the brand on the exchange where it is listed. + *

+ * The field is required. + * + * @param stockSymbol + */ + @JsonProperty("stockSymbol") + public void setStockSymbol(String stockSymbol) { + this.stockSymbol = stockSymbol; + } + + /** + * Sets businessContactEmail. + *

+ * Field description: + * The email address of the individual responsible for processing the 2FA request via email. This must be a personal email address associated with the brand and not a distribution list or support email. + *

+ * The field is required. + * + * @param businessContactEmail + * @return This {@link NumbersPublicCompanyBrand instance}. + */ + public NumbersPublicCompanyBrand businessContactEmail(String businessContactEmail) { + this.businessContactEmail = businessContactEmail; + return this; + } + + /** + * Returns businessContactEmail. + *

+ * Field description: + * The email address of the individual responsible for processing the 2FA request via email. This must be a personal email address associated with the brand and not a distribution list or support email. + *

+ * The field is required. + * + * @return businessContactEmail + */ + @JsonProperty("businessContactEmail") + public String getBusinessContactEmail() { + return businessContactEmail; + } + + /** + * Sets businessContactEmail. + *

+ * Field description: + * The email address of the individual responsible for processing the 2FA request via email. This must be a personal email address associated with the brand and not a distribution list or support email. + *

+ * The field is required. + * + * @param businessContactEmail + */ + @JsonProperty("businessContactEmail") + public void setBusinessContactEmail(String businessContactEmail) { + this.businessContactEmail = businessContactEmail; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersPublicCompanyBrand numbersPublicCompanyBrand = (NumbersPublicCompanyBrand) o; + return Objects.equals(this.referenceId, numbersPublicCompanyBrand.referenceId) + && Objects.equals(this.address, numbersPublicCompanyBrand.address) + && Objects.equals(this.countryCode, numbersPublicCompanyBrand.countryCode) + && Objects.equals(this.supportPhone, numbersPublicCompanyBrand.supportPhone) + && Objects.equals(this.supportEmail, numbersPublicCompanyBrand.supportEmail) + && Objects.equals(this.businessContactFirstName, numbersPublicCompanyBrand.businessContactFirstName) + && Objects.equals(this.businessContactLastName, numbersPublicCompanyBrand.businessContactLastName) + && Objects.equals(this.businessDBA, numbersPublicCompanyBrand.businessDBA) + && Objects.equals(this.legalName, numbersPublicCompanyBrand.legalName) + && Objects.equals(this.alternateBusinessId, numbersPublicCompanyBrand.alternateBusinessId) + && Objects.equals(this.vertical, numbersPublicCompanyBrand.vertical) + && Objects.equals(this.taxId, numbersPublicCompanyBrand.taxId) + && Objects.equals(this.taxIdIssuingCountry, numbersPublicCompanyBrand.taxIdIssuingCountry) + && Objects.equals(this.stockExchange, numbersPublicCompanyBrand.stockExchange) + && Objects.equals(this.stockSymbol, numbersPublicCompanyBrand.stockSymbol) + && Objects.equals(this.businessContactEmail, numbersPublicCompanyBrand.businessContactEmail) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + referenceId, + address, + countryCode, + supportPhone, + supportEmail, + businessContactFirstName, + businessContactLastName, + businessDBA, + legalName, + alternateBusinessId, + vertical, + taxId, + taxIdIssuingCountry, + stockExchange, + stockSymbol, + businessContactEmail, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersPublicCompanyBrand {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" referenceId: ") + .append(toIndentedString(referenceId)) + .append(newLine) + .append(" address: ") + .append(toIndentedString(address)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" supportPhone: ") + .append(toIndentedString(supportPhone)) + .append(newLine) + .append(" supportEmail: ") + .append(toIndentedString(supportEmail)) + .append(newLine) + .append(" businessContactFirstName: ") + .append(toIndentedString(businessContactFirstName)) + .append(newLine) + .append(" businessContactLastName: ") + .append(toIndentedString(businessContactLastName)) + .append(newLine) + .append(" businessDBA: ") + .append(toIndentedString(businessDBA)) + .append(newLine) + .append(" legalName: ") + .append(toIndentedString(legalName)) + .append(newLine) + .append(" alternateBusinessId: ") + .append(toIndentedString(alternateBusinessId)) + .append(newLine) + .append(" vertical: ") + .append(toIndentedString(vertical)) + .append(newLine) + .append(" taxId: ") + .append(toIndentedString(taxId)) + .append(newLine) + .append(" taxIdIssuingCountry: ") + .append(toIndentedString(taxIdIssuingCountry)) + .append(newLine) + .append(" stockExchange: ") + .append(toIndentedString(stockExchange)) + .append(newLine) + .append(" stockSymbol: ") + .append(toIndentedString(stockSymbol)) + .append(newLine) + .append(" businessContactEmail: ") + .append(toIndentedString(businessContactEmail)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersRecordingBody.java b/src/main/java/com/infobip/model/NumbersRecordingBody.java new file mode 100644 index 0000000..62e1905 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersRecordingBody.java @@ -0,0 +1,100 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Recording Configuration object + */ +public class NumbersRecordingBody { + + private Boolean enabled; + + /** + * Sets enabled. + *

+ * Field description: + * True or False. Default is *false*. If *true* then each call made toward this number will be recorded. + * + * @param enabled + * @return This {@link NumbersRecordingBody instance}. + */ + public NumbersRecordingBody enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Returns enabled. + *

+ * Field description: + * True or False. Default is *false*. If *true* then each call made toward this number will be recorded. + * + * @return enabled + */ + @JsonProperty("enabled") + public Boolean getEnabled() { + return enabled; + } + + /** + * Sets enabled. + *

+ * Field description: + * True or False. Default is *false*. If *true* then each call made toward this number will be recorded. + * + * @param enabled + */ + @JsonProperty("enabled") + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersRecordingBody numbersRecordingBody = (NumbersRecordingBody) o; + return Objects.equals(this.enabled, numbersRecordingBody.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersRecordingBody {") + .append(newLine) + .append(" enabled: ") + .append(toIndentedString(enabled)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersRegisterCampaignRequest.java b/src/main/java/com/infobip/model/NumbersRegisterCampaignRequest.java new file mode 100644 index 0000000..2fcd229 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersRegisterCampaignRequest.java @@ -0,0 +1,101 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents NumbersRegisterCampaignRequest model. + */ +public class NumbersRegisterCampaignRequest { + + private UUID priorityId; + + /** + * Sets priorityId. + *

+ * Field description: + * The ID of the campaign priority you would like to use. + * + * @param priorityId + * @return This {@link NumbersRegisterCampaignRequest instance}. + */ + public NumbersRegisterCampaignRequest priorityId(UUID priorityId) { + this.priorityId = priorityId; + return this; + } + + /** + * Returns priorityId. + *

+ * Field description: + * The ID of the campaign priority you would like to use. + * + * @return priorityId + */ + @JsonProperty("priorityId") + public UUID getPriorityId() { + return priorityId; + } + + /** + * Sets priorityId. + *

+ * Field description: + * The ID of the campaign priority you would like to use. + * + * @param priorityId + */ + @JsonProperty("priorityId") + public void setPriorityId(UUID priorityId) { + this.priorityId = priorityId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersRegisterCampaignRequest numbersRegisterCampaignRequest = (NumbersRegisterCampaignRequest) o; + return Objects.equals(this.priorityId, numbersRegisterCampaignRequest.priorityId); + } + + @Override + public int hashCode() { + return Objects.hash(priorityId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersRegisterCampaignRequest {") + .append(newLine) + .append(" priorityId: ") + .append(toIndentedString(priorityId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersRejectionReason.java b/src/main/java/com/infobip/model/NumbersRejectionReason.java new file mode 100644 index 0000000..7497d79 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersRejectionReason.java @@ -0,0 +1,192 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Rejection reasons details. + */ +public class NumbersRejectionReason { + + private String errorCode; + + private String description; + + private String recommendedAction; + + /** + * Sets errorCode. + *

+ * Field description: + * Predefined code. + * + * @param errorCode + * @return This {@link NumbersRejectionReason instance}. + */ + public NumbersRejectionReason errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Returns errorCode. + *

+ * Field description: + * Predefined code. + * + * @return errorCode + */ + @JsonProperty("errorCode") + public String getErrorCode() { + return errorCode; + } + + /** + * Sets errorCode. + *

+ * Field description: + * Predefined code. + * + * @param errorCode + */ + @JsonProperty("errorCode") + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + /** + * Sets description. + *

+ * Field description: + * Rejection reason. + * + * @param description + * @return This {@link NumbersRejectionReason instance}. + */ + public NumbersRejectionReason description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Rejection reason. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Rejection reason. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets recommendedAction. + *

+ * Field description: + * Recommended action. + * + * @param recommendedAction + * @return This {@link NumbersRejectionReason instance}. + */ + public NumbersRejectionReason recommendedAction(String recommendedAction) { + this.recommendedAction = recommendedAction; + return this; + } + + /** + * Returns recommendedAction. + *

+ * Field description: + * Recommended action. + * + * @return recommendedAction + */ + @JsonProperty("recommendedAction") + public String getRecommendedAction() { + return recommendedAction; + } + + /** + * Sets recommendedAction. + *

+ * Field description: + * Recommended action. + * + * @param recommendedAction + */ + @JsonProperty("recommendedAction") + public void setRecommendedAction(String recommendedAction) { + this.recommendedAction = recommendedAction; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersRejectionReason numbersRejectionReason = (NumbersRejectionReason) o; + return Objects.equals(this.errorCode, numbersRejectionReason.errorCode) + && Objects.equals(this.description, numbersRejectionReason.description) + && Objects.equals(this.recommendedAction, numbersRejectionReason.recommendedAction); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, description, recommendedAction); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersRejectionReason {") + .append(newLine) + .append(" errorCode: ") + .append(toIndentedString(errorCode)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" recommendedAction: ") + .append(toIndentedString(recommendedAction)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersRejectionReasonPayload.java b/src/main/java/com/infobip/model/NumbersRejectionReasonPayload.java new file mode 100644 index 0000000..128267f --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersRejectionReasonPayload.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The rejection reasons details. This field is present only when new campaign registration status is 'REJECTED'. + */ +public class NumbersRejectionReasonPayload { + + private String errorCode; + + private String description; + + /** + * Sets errorCode. + *

+ * Field description: + * Predefined code. + * + * @param errorCode + * @return This {@link NumbersRejectionReasonPayload instance}. + */ + public NumbersRejectionReasonPayload errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Returns errorCode. + *

+ * Field description: + * Predefined code. + * + * @return errorCode + */ + @JsonProperty("errorCode") + public String getErrorCode() { + return errorCode; + } + + /** + * Sets errorCode. + *

+ * Field description: + * Predefined code. + * + * @param errorCode + */ + @JsonProperty("errorCode") + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + /** + * Sets description. + *

+ * Field description: + * Rejection reason. + * + * @param description + * @return This {@link NumbersRejectionReasonPayload instance}. + */ + public NumbersRejectionReasonPayload description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Rejection reason. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Rejection reason. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersRejectionReasonPayload numbersRejectionReasonPayload = (NumbersRejectionReasonPayload) o; + return Objects.equals(this.errorCode, numbersRejectionReasonPayload.errorCode) + && Objects.equals(this.description, numbersRejectionReasonPayload.description); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, description); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersRejectionReasonPayload {") + .append(newLine) + .append(" errorCode: ") + .append(toIndentedString(errorCode)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersReservationStatus.java b/src/main/java/com/infobip/model/NumbersReservationStatus.java new file mode 100644 index 0000000..4d7e29f --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersReservationStatus.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Status of the number reservation. + */ +public enum NumbersReservationStatus { + PENDING("PENDING"), + BILLING_FAILED("BILLING_FAILED"), + ERROR("ERROR"), + RESERVATION_FAILED("RESERVATION_FAILED"); + + private final String value; + + NumbersReservationStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersReservationStatus fromValue(String value) { + for (NumbersReservationStatus enumElement : NumbersReservationStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersResponse.java b/src/main/java/com/infobip/model/NumbersResponse.java new file mode 100644 index 0000000..6348311 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersResponse.java @@ -0,0 +1,144 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents NumbersResponse model. + */ +public class NumbersResponse { + + private List numbers = null; + + private Long numberCount; + + /** + * Sets numbers. + * + * @param numbers + * @return This {@link NumbersResponse instance}. + */ + public NumbersResponse numbers(List numbers) { + this.numbers = numbers; + return this; + } + + /** + * Adds and item into numbers. + * + * @param numbersItem The item to be added to the list. + * @return This {@link NumbersResponse instance}. + */ + public NumbersResponse addNumbersItem(NumbersNumberResponse numbersItem) { + if (this.numbers == null) { + this.numbers = new ArrayList<>(); + } + this.numbers.add(numbersItem); + return this; + } + + /** + * Returns numbers. + * + * @return numbers + */ + @JsonProperty("numbers") + public List getNumbers() { + return numbers; + } + + /** + * Sets numbers. + * + * @param numbers + */ + @JsonProperty("numbers") + public void setNumbers(List numbers) { + this.numbers = numbers; + } + + /** + * Sets numberCount. + * + * @param numberCount + * @return This {@link NumbersResponse instance}. + */ + public NumbersResponse numberCount(Long numberCount) { + this.numberCount = numberCount; + return this; + } + + /** + * Returns numberCount. + * + * @return numberCount + */ + @JsonProperty("numberCount") + public Long getNumberCount() { + return numberCount; + } + + /** + * Sets numberCount. + * + * @param numberCount + */ + @JsonProperty("numberCount") + public void setNumberCount(Long numberCount) { + this.numberCount = numberCount; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersResponse numbersResponse = (NumbersResponse) o; + return Objects.equals(this.numbers, numbersResponse.numbers) + && Objects.equals(this.numberCount, numbersResponse.numberCount); + } + + @Override + public int hashCode() { + return Objects.hash(numbers, numberCount); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersResponse {") + .append(newLine) + .append(" numbers: ") + .append(toIndentedString(numbers)) + .append(newLine) + .append(" numberCount: ") + .append(toIndentedString(numberCount)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersReviewSubmissionResponse.java b/src/main/java/com/infobip/model/NumbersReviewSubmissionResponse.java new file mode 100644 index 0000000..b48b92a --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersReviewSubmissionResponse.java @@ -0,0 +1,101 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; +import java.util.UUID; + +/** + * Response containing the request UUID for tracking the AI review submission + */ +public class NumbersReviewSubmissionResponse { + + private UUID requestUuid; + + /** + * Sets requestUuid. + *

+ * Field description: + * Unique identifier for this AI review request. + * + * @param requestUuid + * @return This {@link NumbersReviewSubmissionResponse instance}. + */ + public NumbersReviewSubmissionResponse requestUuid(UUID requestUuid) { + this.requestUuid = requestUuid; + return this; + } + + /** + * Returns requestUuid. + *

+ * Field description: + * Unique identifier for this AI review request. + * + * @return requestUuid + */ + @JsonProperty("requestUuid") + public UUID getRequestUuid() { + return requestUuid; + } + + /** + * Sets requestUuid. + *

+ * Field description: + * Unique identifier for this AI review request. + * + * @param requestUuid + */ + @JsonProperty("requestUuid") + public void setRequestUuid(UUID requestUuid) { + this.requestUuid = requestUuid; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersReviewSubmissionResponse numbersReviewSubmissionResponse = (NumbersReviewSubmissionResponse) o; + return Objects.equals(this.requestUuid, numbersReviewSubmissionResponse.requestUuid); + } + + @Override + public int hashCode() { + return Objects.hash(requestUuid); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersReviewSubmissionResponse {") + .append(newLine) + .append(" requestUuid: ") + .append(toIndentedString(requestUuid)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersReviewType.java b/src/main/java/com/infobip/model/NumbersReviewType.java new file mode 100644 index 0000000..464c099 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersReviewType.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of review submission + */ +public enum NumbersReviewType { + TEN_DIGIT_LONG_CODE("TEN_DIGIT_LONG_CODE"), + TOLL_FREE_NUMBER("TOLL_FREE_NUMBER"), + TEN_DIGIT_LONG_CODE2("TEN_DIGIT_LONG_CODE"); + + private final String value; + + NumbersReviewType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersReviewType fromValue(String value) { + for (NumbersReviewType enumElement : NumbersReviewType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersStatusResponse.java b/src/main/java/com/infobip/model/NumbersStatusResponse.java new file mode 100644 index 0000000..eecd70d --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersStatusResponse.java @@ -0,0 +1,137 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Current status of Emergency Service configuration. + */ +public class NumbersStatusResponse { + + private CallsStatus status; + + private String reason; + + /** + * Sets status. + * + * @param status + * @return This {@link NumbersStatusResponse instance}. + */ + public NumbersStatusResponse status(CallsStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + * + * @return status + */ + @JsonProperty("status") + public CallsStatus getStatus() { + return status; + } + + /** + * Sets status. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(CallsStatus status) { + this.status = status; + } + + /** + * Sets reason. + *

+ * Field description: + * Description of the status. + * + * @param reason + * @return This {@link NumbersStatusResponse instance}. + */ + public NumbersStatusResponse reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Returns reason. + *

+ * Field description: + * Description of the status. + * + * @return reason + */ + @JsonProperty("reason") + public String getReason() { + return reason; + } + + /** + * Sets reason. + *

+ * Field description: + * Description of the status. + * + * @param reason + */ + @JsonProperty("reason") + public void setReason(String reason) { + this.reason = reason; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersStatusResponse numbersStatusResponse = (NumbersStatusResponse) o; + return Objects.equals(this.status, numbersStatusResponse.status) + && Objects.equals(this.reason, numbersStatusResponse.reason); + } + + @Override + public int hashCode() { + return Objects.hash(status, reason); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersStatusResponse {") + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" reason: ") + .append(toIndentedString(reason)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersStockExchange.java b/src/main/java/com/infobip/model/NumbersStockExchange.java new file mode 100644 index 0000000..91e7503 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersStockExchange.java @@ -0,0 +1,71 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The stock exchange where brand is listed. + */ +public enum NumbersStockExchange { + AMEX("AMEX"), + AMX("AMX"), + ASX("ASX"), + B3("B3"), + BME("BME"), + BSE("BSE"), + FRA("FRA"), + ICEX("ICEX"), + JPX("JPX"), + JSE("JSE"), + KRX("KRX"), + LON("LON"), + NASDAQ("NASDAQ"), + NSE("NSE"), + NYSE("NYSE"), + OMX("OMX"), + SEHK("SEHK"), + SGX("SGX"), + SSE("SSE"), + STO("STO"), + SWX("SWX"), + SZSE("SZSE"), + TSX("TSX"), + TWSE("TWSE"), + VSE("VSE"), + OTHER("OTHER"); + + private final String value; + + NumbersStockExchange(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersStockExchange fromValue(String value) { + for (NumbersStockExchange enumElement : NumbersStockExchange.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersTenDlcAiReviewRequest.java b/src/main/java/com/infobip/model/NumbersTenDlcAiReviewRequest.java new file mode 100644 index 0000000..47d2fcf --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersTenDlcAiReviewRequest.java @@ -0,0 +1,571 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Request to submit 10DLC campaign info for AI compliance review with full details + */ +public class NumbersTenDlcAiReviewRequest { + + private String optInMessage; + + private String helpMessage; + + private String optOutMessage; + + private String ctaWebsite; + + private List ctas = new ArrayList<>(); + + private List useCases = new ArrayList<>(); + + private Boolean ageGated; + + private Boolean directLending; + + private String messageFlow; + + /** + * Sets optInMessage. + *

+ * Field description: + * The message sent to the user after they have subscribed. + *

+ * The field is required. + * + * @param optInMessage + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest optInMessage(String optInMessage) { + this.optInMessage = optInMessage; + return this; + } + + /** + * Returns optInMessage. + *

+ * Field description: + * The message sent to the user after they have subscribed. + *

+ * The field is required. + * + * @return optInMessage + */ + @JsonProperty("optInMessage") + public String getOptInMessage() { + return optInMessage; + } + + /** + * Sets optInMessage. + *

+ * Field description: + * The message sent to the user after they have subscribed. + *

+ * The field is required. + * + * @param optInMessage + */ + @JsonProperty("optInMessage") + public void setOptInMessage(String optInMessage) { + this.optInMessage = optInMessage; + } + + /** + * Sets helpMessage. + *

+ * Field description: + * The message sent to a user after they have asked for help. + *

+ * The field is required. + * + * @param helpMessage + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest helpMessage(String helpMessage) { + this.helpMessage = helpMessage; + return this; + } + + /** + * Returns helpMessage. + *

+ * Field description: + * The message sent to a user after they have asked for help. + *

+ * The field is required. + * + * @return helpMessage + */ + @JsonProperty("helpMessage") + public String getHelpMessage() { + return helpMessage; + } + + /** + * Sets helpMessage. + *

+ * Field description: + * The message sent to a user after they have asked for help. + *

+ * The field is required. + * + * @param helpMessage + */ + @JsonProperty("helpMessage") + public void setHelpMessage(String helpMessage) { + this.helpMessage = helpMessage; + } + + /** + * Sets optOutMessage. + *

+ * Field description: + * The message sent to a user after they have asked to stop receiving messages. + *

+ * The field is required. + * + * @param optOutMessage + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest optOutMessage(String optOutMessage) { + this.optOutMessage = optOutMessage; + return this; + } + + /** + * Returns optOutMessage. + *

+ * Field description: + * The message sent to a user after they have asked to stop receiving messages. + *

+ * The field is required. + * + * @return optOutMessage + */ + @JsonProperty("optOutMessage") + public String getOptOutMessage() { + return optOutMessage; + } + + /** + * Sets optOutMessage. + *

+ * Field description: + * The message sent to a user after they have asked to stop receiving messages. + *

+ * The field is required. + * + * @param optOutMessage + */ + @JsonProperty("optOutMessage") + public void setOptOutMessage(String optOutMessage) { + this.optOutMessage = optOutMessage; + } + + /** + * Sets ctaWebsite. + *

+ * Field description: + * CTA website URL + *

+ * The field is required. + * + * @param ctaWebsite + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest ctaWebsite(String ctaWebsite) { + this.ctaWebsite = ctaWebsite; + return this; + } + + /** + * Returns ctaWebsite. + *

+ * Field description: + * CTA website URL + *

+ * The field is required. + * + * @return ctaWebsite + */ + @JsonProperty("ctaWebsite") + public String getCtaWebsite() { + return ctaWebsite; + } + + /** + * Sets ctaWebsite. + *

+ * Field description: + * CTA website URL + *

+ * The field is required. + * + * @param ctaWebsite + */ + @JsonProperty("ctaWebsite") + public void setCtaWebsite(String ctaWebsite) { + this.ctaWebsite = ctaWebsite; + } + + /** + * Sets ctas. + *

+ * Field description: + * List of call-to-action texts + *

+ * The field is required. + * + * @param ctas + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest ctas(List ctas) { + this.ctas = ctas; + return this; + } + + /** + * Adds and item into ctas. + *

+ * Field description: + * List of call-to-action texts + *

+ * The field is required. + * + * @param ctasItem The item to be added to the list. + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest addCtasItem(String ctasItem) { + if (this.ctas == null) { + this.ctas = new ArrayList<>(); + } + this.ctas.add(ctasItem); + return this; + } + + /** + * Returns ctas. + *

+ * Field description: + * List of call-to-action texts + *

+ * The field is required. + * + * @return ctas + */ + @JsonProperty("ctas") + public List getCtas() { + return ctas; + } + + /** + * Sets ctas. + *

+ * Field description: + * List of call-to-action texts + *

+ * The field is required. + * + * @param ctas + */ + @JsonProperty("ctas") + public void setCtas(List ctas) { + this.ctas = ctas; + } + + /** + * Sets useCases. + *

+ * Field description: + * The use cases for this campaign. + *

+ * The field is required. + * + * @param useCases + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest useCases(List useCases) { + this.useCases = useCases; + return this; + } + + /** + * Adds and item into useCases. + *

+ * Field description: + * The use cases for this campaign. + *

+ * The field is required. + * + * @param useCasesItem The item to be added to the list. + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest addUseCasesItem(NumbersTenDlcUseCase useCasesItem) { + if (this.useCases == null) { + this.useCases = new ArrayList<>(); + } + this.useCases.add(useCasesItem); + return this; + } + + /** + * Returns useCases. + *

+ * Field description: + * The use cases for this campaign. + *

+ * The field is required. + * + * @return useCases + */ + @JsonProperty("useCases") + public List getUseCases() { + return useCases; + } + + /** + * Sets useCases. + *

+ * Field description: + * The use cases for this campaign. + *

+ * The field is required. + * + * @param useCases + */ + @JsonProperty("useCases") + public void setUseCases(List useCases) { + this.useCases = useCases; + } + + /** + * Sets ageGated. + *

+ * Field description: + * Whether the campaign is age-gated (18+) + *

+ * The field is required. + * + * @param ageGated + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest ageGated(Boolean ageGated) { + this.ageGated = ageGated; + return this; + } + + /** + * Returns ageGated. + *

+ * Field description: + * Whether the campaign is age-gated (18+) + *

+ * The field is required. + * + * @return ageGated + */ + @JsonProperty("ageGated") + public Boolean getAgeGated() { + return ageGated; + } + + /** + * Sets ageGated. + *

+ * Field description: + * Whether the campaign is age-gated (18+) + *

+ * The field is required. + * + * @param ageGated + */ + @JsonProperty("ageGated") + public void setAgeGated(Boolean ageGated) { + this.ageGated = ageGated; + } + + /** + * Sets directLending. + *

+ * Field description: + * Whether the campaign involves direct lending + *

+ * The field is required. + * + * @param directLending + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest directLending(Boolean directLending) { + this.directLending = directLending; + return this; + } + + /** + * Returns directLending. + *

+ * Field description: + * Whether the campaign involves direct lending + *

+ * The field is required. + * + * @return directLending + */ + @JsonProperty("directLending") + public Boolean getDirectLending() { + return directLending; + } + + /** + * Sets directLending. + *

+ * Field description: + * Whether the campaign involves direct lending + *

+ * The field is required. + * + * @param directLending + */ + @JsonProperty("directLending") + public void setDirectLending(Boolean directLending) { + this.directLending = directLending; + } + + /** + * Sets messageFlow. + *

+ * Field description: + * Message flow description + *

+ * The field is required. + * + * @param messageFlow + * @return This {@link NumbersTenDlcAiReviewRequest instance}. + */ + public NumbersTenDlcAiReviewRequest messageFlow(String messageFlow) { + this.messageFlow = messageFlow; + return this; + } + + /** + * Returns messageFlow. + *

+ * Field description: + * Message flow description + *

+ * The field is required. + * + * @return messageFlow + */ + @JsonProperty("messageFlow") + public String getMessageFlow() { + return messageFlow; + } + + /** + * Sets messageFlow. + *

+ * Field description: + * Message flow description + *

+ * The field is required. + * + * @param messageFlow + */ + @JsonProperty("messageFlow") + public void setMessageFlow(String messageFlow) { + this.messageFlow = messageFlow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersTenDlcAiReviewRequest numbersTenDlcAiReviewRequest = (NumbersTenDlcAiReviewRequest) o; + return Objects.equals(this.optInMessage, numbersTenDlcAiReviewRequest.optInMessage) + && Objects.equals(this.helpMessage, numbersTenDlcAiReviewRequest.helpMessage) + && Objects.equals(this.optOutMessage, numbersTenDlcAiReviewRequest.optOutMessage) + && Objects.equals(this.ctaWebsite, numbersTenDlcAiReviewRequest.ctaWebsite) + && Objects.equals(this.ctas, numbersTenDlcAiReviewRequest.ctas) + && Objects.equals(this.useCases, numbersTenDlcAiReviewRequest.useCases) + && Objects.equals(this.ageGated, numbersTenDlcAiReviewRequest.ageGated) + && Objects.equals(this.directLending, numbersTenDlcAiReviewRequest.directLending) + && Objects.equals(this.messageFlow, numbersTenDlcAiReviewRequest.messageFlow); + } + + @Override + public int hashCode() { + return Objects.hash( + optInMessage, + helpMessage, + optOutMessage, + ctaWebsite, + ctas, + useCases, + ageGated, + directLending, + messageFlow); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersTenDlcAiReviewRequest {") + .append(newLine) + .append(" optInMessage: ") + .append(toIndentedString(optInMessage)) + .append(newLine) + .append(" helpMessage: ") + .append(toIndentedString(helpMessage)) + .append(newLine) + .append(" optOutMessage: ") + .append(toIndentedString(optOutMessage)) + .append(newLine) + .append(" ctaWebsite: ") + .append(toIndentedString(ctaWebsite)) + .append(newLine) + .append(" ctas: ") + .append(toIndentedString(ctas)) + .append(newLine) + .append(" useCases: ") + .append(toIndentedString(useCases)) + .append(newLine) + .append(" ageGated: ") + .append(toIndentedString(ageGated)) + .append(newLine) + .append(" directLending: ") + .append(toIndentedString(directLending)) + .append(newLine) + .append(" messageFlow: ") + .append(toIndentedString(messageFlow)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersTenDlcCampaign.java b/src/main/java/com/infobip/model/NumbersTenDlcCampaign.java new file mode 100644 index 0000000..25970e8 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersTenDlcCampaign.java @@ -0,0 +1,1430 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; + +/** + * Represents NumbersTenDlcCampaign model. + */ +public class NumbersTenDlcCampaign extends NumbersCampaign { + + private UUID brandId; + + private NumbersBrandPreview brandPreview; + + private NumbersAppealData appealData; + + private String programSummary; + + private String confirmationMessage; + + private List exampleMessages = new ArrayList<>(); + + private String helpMessage; + + private String stopMessage; + + private Set messageTypes = new LinkedHashSet<>(); + + private String termsAndConditionsUrl; + + private NumbersOptIns optIns; + + private Boolean ageGated; + + private String customerCarePhone; + + private Boolean lowVolume = false; + + private Set useCases = new LinkedHashSet<>(); + + private Boolean directLending; + + private Boolean embeddedLink; + + private Boolean embeddedPhone; + + private String customerCareEmail; + + private List mmsSampleFiles = null; + + private List supportingDocuments = null; + + private Set numberKeys = null; + + private Set numbers = null; + + private Set numberPreviews = null; + + private NumbersNumberPool numberPool; + + /** + * Constructs a new {@link NumbersTenDlcCampaign} instance. + */ + public NumbersTenDlcCampaign() { + super("TEN_DIGIT_LONG_CODE"); + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand to use with the campaign. + *

+ * The field is required. + * + * @param brandId + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign brandId(UUID brandId) { + this.brandId = brandId; + return this; + } + + /** + * Returns brandId. + *

+ * Field description: + * The ID of the brand to use with the campaign. + *

+ * The field is required. + * + * @return brandId + */ + @JsonProperty("brandId") + public UUID getBrandId() { + return brandId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand to use with the campaign. + *

+ * The field is required. + * + * @param brandId + */ + @JsonProperty("brandId") + public void setBrandId(UUID brandId) { + this.brandId = brandId; + } + + /** + * Sets brandPreview. + * + * @param brandPreview + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign brandPreview(NumbersBrandPreview brandPreview) { + this.brandPreview = brandPreview; + return this; + } + + /** + * Returns brandPreview. + * + * @return brandPreview + */ + @JsonProperty("brandPreview") + public NumbersBrandPreview getBrandPreview() { + return brandPreview; + } + + /** + * Sets brandPreview. + * + * @param brandPreview + */ + @JsonProperty("brandPreview") + public void setBrandPreview(NumbersBrandPreview brandPreview) { + this.brandPreview = brandPreview; + } + + /** + * Sets appealData. + * + * @param appealData + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign appealData(NumbersAppealData appealData) { + this.appealData = appealData; + return this; + } + + /** + * Returns appealData. + * + * @return appealData + */ + @JsonProperty("appealData") + public NumbersAppealData getAppealData() { + return appealData; + } + + /** + * Sets appealData. + * + * @param appealData + */ + @JsonProperty("appealData") + public void setAppealData(NumbersAppealData appealData) { + this.appealData = appealData; + } + + /** + * Sets programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @param programSummary + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign programSummary(String programSummary) { + this.programSummary = programSummary; + return this; + } + + /** + * Returns programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @return programSummary + */ + @JsonProperty("programSummary") + public String getProgramSummary() { + return programSummary; + } + + /** + * Sets programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @param programSummary + */ + @JsonProperty("programSummary") + public void setProgramSummary(String programSummary) { + this.programSummary = programSummary; + } + + /** + * Sets confirmationMessage. + *

+ * Field description: + * The message sent to the user after they have subscribed. + *

+ * The field is required. + * + * @param confirmationMessage + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign confirmationMessage(String confirmationMessage) { + this.confirmationMessage = confirmationMessage; + return this; + } + + /** + * Returns confirmationMessage. + *

+ * Field description: + * The message sent to the user after they have subscribed. + *

+ * The field is required. + * + * @return confirmationMessage + */ + @JsonProperty("confirmationMessage") + public String getConfirmationMessage() { + return confirmationMessage; + } + + /** + * Sets confirmationMessage. + *

+ * Field description: + * The message sent to the user after they have subscribed. + *

+ * The field is required. + * + * @param confirmationMessage + */ + @JsonProperty("confirmationMessage") + public void setConfirmationMessage(String confirmationMessage) { + this.confirmationMessage = confirmationMessage; + } + + /** + * Sets exampleMessages. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @param exampleMessages + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign exampleMessages(List exampleMessages) { + this.exampleMessages = exampleMessages; + return this; + } + + /** + * Adds and item into exampleMessages. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @param exampleMessagesItem The item to be added to the list. + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign addExampleMessagesItem(String exampleMessagesItem) { + if (this.exampleMessages == null) { + this.exampleMessages = new ArrayList<>(); + } + this.exampleMessages.add(exampleMessagesItem); + return this; + } + + /** + * Returns exampleMessages. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @return exampleMessages + */ + @JsonProperty("exampleMessages") + public List getExampleMessages() { + return exampleMessages; + } + + /** + * Sets exampleMessages. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @param exampleMessages + */ + @JsonProperty("exampleMessages") + public void setExampleMessages(List exampleMessages) { + this.exampleMessages = exampleMessages; + } + + /** + * Sets helpMessage. + *

+ * Field description: + * The message sent to a user after they have asked for help. + *

+ * The field is required. + * + * @param helpMessage + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign helpMessage(String helpMessage) { + this.helpMessage = helpMessage; + return this; + } + + /** + * Returns helpMessage. + *

+ * Field description: + * The message sent to a user after they have asked for help. + *

+ * The field is required. + * + * @return helpMessage + */ + @JsonProperty("helpMessage") + public String getHelpMessage() { + return helpMessage; + } + + /** + * Sets helpMessage. + *

+ * Field description: + * The message sent to a user after they have asked for help. + *

+ * The field is required. + * + * @param helpMessage + */ + @JsonProperty("helpMessage") + public void setHelpMessage(String helpMessage) { + this.helpMessage = helpMessage; + } + + /** + * Sets stopMessage. + *

+ * Field description: + * The message sent to a user after they have asked to stop receiving messages. + *

+ * The field is required. + * + * @param stopMessage + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign stopMessage(String stopMessage) { + this.stopMessage = stopMessage; + return this; + } + + /** + * Returns stopMessage. + *

+ * Field description: + * The message sent to a user after they have asked to stop receiving messages. + *

+ * The field is required. + * + * @return stopMessage + */ + @JsonProperty("stopMessage") + public String getStopMessage() { + return stopMessage; + } + + /** + * Sets stopMessage. + *

+ * Field description: + * The message sent to a user after they have asked to stop receiving messages. + *

+ * The field is required. + * + * @param stopMessage + */ + @JsonProperty("stopMessage") + public void setStopMessage(String stopMessage) { + this.stopMessage = stopMessage; + } + + /** + * Sets messageTypes. + *

+ * Field description: + * The message type(s) this campaign will use to send messages. + *

+ * The field is required. + * + * @param messageTypes + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign messageTypes(Set messageTypes) { + this.messageTypes = messageTypes; + return this; + } + + /** + * Adds and item into messageTypes. + *

+ * Field description: + * The message type(s) this campaign will use to send messages. + *

+ * The field is required. + * + * @param messageTypesItem The item to be added to the list. + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign addMessageTypesItem(NumbersMessageType messageTypesItem) { + if (this.messageTypes == null) { + this.messageTypes = new LinkedHashSet<>(); + } + this.messageTypes.add(messageTypesItem); + return this; + } + + /** + * Returns messageTypes. + *

+ * Field description: + * The message type(s) this campaign will use to send messages. + *

+ * The field is required. + * + * @return messageTypes + */ + @JsonProperty("messageTypes") + public Set getMessageTypes() { + return messageTypes; + } + + /** + * Sets messageTypes. + *

+ * Field description: + * The message type(s) this campaign will use to send messages. + *

+ * The field is required. + * + * @param messageTypes + */ + @JsonProperty("messageTypes") + public void setMessageTypes(Set messageTypes) { + this.messageTypes = messageTypes; + } + + /** + * Sets termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + *

+ * The field is required. + * + * @param termsAndConditionsUrl + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign termsAndConditionsUrl(String termsAndConditionsUrl) { + this.termsAndConditionsUrl = termsAndConditionsUrl; + return this; + } + + /** + * Returns termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + *

+ * The field is required. + * + * @return termsAndConditionsUrl + */ + @JsonProperty("termsAndConditionsUrl") + public String getTermsAndConditionsUrl() { + return termsAndConditionsUrl; + } + + /** + * Sets termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + *

+ * The field is required. + * + * @param termsAndConditionsUrl + */ + @JsonProperty("termsAndConditionsUrl") + public void setTermsAndConditionsUrl(String termsAndConditionsUrl) { + this.termsAndConditionsUrl = termsAndConditionsUrl; + } + + /** + * Sets optIns. + *

+ * The field is required. + * + * @param optIns + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign optIns(NumbersOptIns optIns) { + this.optIns = optIns; + return this; + } + + /** + * Returns optIns. + *

+ * The field is required. + * + * @return optIns + */ + @JsonProperty("optIns") + public NumbersOptIns getOptIns() { + return optIns; + } + + /** + * Sets optIns. + *

+ * The field is required. + * + * @param optIns + */ + @JsonProperty("optIns") + public void setOptIns(NumbersOptIns optIns) { + this.optIns = optIns; + } + + /** + * Sets ageGated. + *

+ * Field description: + * Shows whether the campaign will include any age-gated content, as defined by Carrier and CTIA guidelines. + * + * @param ageGated + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign ageGated(Boolean ageGated) { + this.ageGated = ageGated; + return this; + } + + /** + * Returns ageGated. + *

+ * Field description: + * Shows whether the campaign will include any age-gated content, as defined by Carrier and CTIA guidelines. + * + * @return ageGated + */ + @JsonProperty("ageGated") + public Boolean getAgeGated() { + return ageGated; + } + + /** + * Sets ageGated. + *

+ * Field description: + * Shows whether the campaign will include any age-gated content, as defined by Carrier and CTIA guidelines. + * + * @param ageGated + */ + @JsonProperty("ageGated") + public void setAgeGated(Boolean ageGated) { + this.ageGated = ageGated; + } + + /** + * Sets customerCarePhone. + *

+ * Field description: + * The phone number the user may call to get customer care. + *

+ * The field is required. + * + * @param customerCarePhone + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign customerCarePhone(String customerCarePhone) { + this.customerCarePhone = customerCarePhone; + return this; + } + + /** + * Returns customerCarePhone. + *

+ * Field description: + * The phone number the user may call to get customer care. + *

+ * The field is required. + * + * @return customerCarePhone + */ + @JsonProperty("customerCarePhone") + public String getCustomerCarePhone() { + return customerCarePhone; + } + + /** + * Sets customerCarePhone. + *

+ * Field description: + * The phone number the user may call to get customer care. + *

+ * The field is required. + * + * @param customerCarePhone + */ + @JsonProperty("customerCarePhone") + public void setCustomerCarePhone(String customerCarePhone) { + this.customerCarePhone = customerCarePhone; + } + + /** + * Sets lowVolume. + *

+ * Field description: + * Low volume campaigns are a lower cost campaign designed for low daily volume and non-time-sensitive messages. They are limited to 6 messages per minute on most carriers and no more than 5,000 messages per month on all carriers. + *

+ * The field is required. + * + * @param lowVolume + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign lowVolume(Boolean lowVolume) { + this.lowVolume = lowVolume; + return this; + } + + /** + * Returns lowVolume. + *

+ * Field description: + * Low volume campaigns are a lower cost campaign designed for low daily volume and non-time-sensitive messages. They are limited to 6 messages per minute on most carriers and no more than 5,000 messages per month on all carriers. + *

+ * The field is required. + * + * @return lowVolume + */ + @JsonProperty("lowVolume") + public Boolean getLowVolume() { + return lowVolume; + } + + /** + * Sets lowVolume. + *

+ * Field description: + * Low volume campaigns are a lower cost campaign designed for low daily volume and non-time-sensitive messages. They are limited to 6 messages per minute on most carriers and no more than 5,000 messages per month on all carriers. + *

+ * The field is required. + * + * @param lowVolume + */ + @JsonProperty("lowVolume") + public void setLowVolume(Boolean lowVolume) { + this.lowVolume = lowVolume; + } + + /** + * Sets useCases. + *

+ * Field description: + * The use cases for this campaign. + *

+ * The field is required. + * + * @param useCases + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign useCases(Set useCases) { + this.useCases = useCases; + return this; + } + + /** + * Adds and item into useCases. + *

+ * Field description: + * The use cases for this campaign. + *

+ * The field is required. + * + * @param useCasesItem The item to be added to the list. + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign addUseCasesItem(NumbersTenDlcUseCase useCasesItem) { + if (this.useCases == null) { + this.useCases = new LinkedHashSet<>(); + } + this.useCases.add(useCasesItem); + return this; + } + + /** + * Returns useCases. + *

+ * Field description: + * The use cases for this campaign. + *

+ * The field is required. + * + * @return useCases + */ + @JsonProperty("useCases") + public Set getUseCases() { + return useCases; + } + + /** + * Sets useCases. + *

+ * Field description: + * The use cases for this campaign. + *

+ * The field is required. + * + * @param useCases + */ + @JsonProperty("useCases") + public void setUseCases(Set useCases) { + this.useCases = useCases; + } + + /** + * Sets directLending. + *

+ * Field description: + * Shows whether the campaign will include content related to direct lending or other loan arrangements. + * + * @param directLending + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign directLending(Boolean directLending) { + this.directLending = directLending; + return this; + } + + /** + * Returns directLending. + *

+ * Field description: + * Shows whether the campaign will include content related to direct lending or other loan arrangements. + * + * @return directLending + */ + @JsonProperty("directLending") + public Boolean getDirectLending() { + return directLending; + } + + /** + * Sets directLending. + *

+ * Field description: + * Shows whether the campaign will include content related to direct lending or other loan arrangements. + * + * @param directLending + */ + @JsonProperty("directLending") + public void setDirectLending(Boolean directLending) { + this.directLending = directLending; + } + + /** + * Sets embeddedLink. + *

+ * Field description: + * Shows whether the campaign will send embedded links of any kind. Public URL shorteners (bitly, tinyurl) are not accepted. + * + * @param embeddedLink + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign embeddedLink(Boolean embeddedLink) { + this.embeddedLink = embeddedLink; + return this; + } + + /** + * Returns embeddedLink. + *

+ * Field description: + * Shows whether the campaign will send embedded links of any kind. Public URL shorteners (bitly, tinyurl) are not accepted. + * + * @return embeddedLink + */ + @JsonProperty("embeddedLink") + public Boolean getEmbeddedLink() { + return embeddedLink; + } + + /** + * Sets embeddedLink. + *

+ * Field description: + * Shows whether the campaign will send embedded links of any kind. Public URL shorteners (bitly, tinyurl) are not accepted. + * + * @param embeddedLink + */ + @JsonProperty("embeddedLink") + public void setEmbeddedLink(Boolean embeddedLink) { + this.embeddedLink = embeddedLink; + } + + /** + * Sets embeddedPhone. + *

+ * Field description: + * Shows whether any embedded phone numbers would be used in the campaign, except the required HELP information contact phone number. + * + * @param embeddedPhone + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign embeddedPhone(Boolean embeddedPhone) { + this.embeddedPhone = embeddedPhone; + return this; + } + + /** + * Returns embeddedPhone. + *

+ * Field description: + * Shows whether any embedded phone numbers would be used in the campaign, except the required HELP information contact phone number. + * + * @return embeddedPhone + */ + @JsonProperty("embeddedPhone") + public Boolean getEmbeddedPhone() { + return embeddedPhone; + } + + /** + * Sets embeddedPhone. + *

+ * Field description: + * Shows whether any embedded phone numbers would be used in the campaign, except the required HELP information contact phone number. + * + * @param embeddedPhone + */ + @JsonProperty("embeddedPhone") + public void setEmbeddedPhone(Boolean embeddedPhone) { + this.embeddedPhone = embeddedPhone; + } + + /** + * Sets customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param customerCareEmail + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign customerCareEmail(String customerCareEmail) { + this.customerCareEmail = customerCareEmail; + return this; + } + + /** + * Returns customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return customerCareEmail + */ + @JsonProperty("customerCareEmail") + public String getCustomerCareEmail() { + return customerCareEmail; + } + + /** + * Sets customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param customerCareEmail + */ + @JsonProperty("customerCareEmail") + public void setCustomerCareEmail(String customerCareEmail) { + this.customerCareEmail = customerCareEmail; + } + + /** + * Sets mmsSampleFiles. + *

+ * Field description: + * List of MMS sample files for the campaign. Each entry can be either a URL to an external file or a UUID of a previously uploaded document. Maximum 5 files allowed. Supported file types: .bmp, .dib, .gif, .jpeg, .jpg, .m2a, .m4a, .m4b, .m4p, .m4r, .m4v, .mp1, .mp2, .mp3, .mp4, .mpa, .oga, .ogg, .ogm, .ogv, .ogx, .png, .spx, .txt, .wav, .webm. + * + * @param mmsSampleFiles + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign mmsSampleFiles(List mmsSampleFiles) { + this.mmsSampleFiles = mmsSampleFiles; + return this; + } + + /** + * Adds and item into mmsSampleFiles. + *

+ * Field description: + * List of MMS sample files for the campaign. Each entry can be either a URL to an external file or a UUID of a previously uploaded document. Maximum 5 files allowed. Supported file types: .bmp, .dib, .gif, .jpeg, .jpg, .m2a, .m4a, .m4b, .m4p, .m4r, .m4v, .mp1, .mp2, .mp3, .mp4, .mpa, .oga, .ogg, .ogm, .ogv, .ogx, .png, .spx, .txt, .wav, .webm. + * + * @param mmsSampleFilesItem The item to be added to the list. + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign addMmsSampleFilesItem(String mmsSampleFilesItem) { + if (this.mmsSampleFiles == null) { + this.mmsSampleFiles = new ArrayList<>(); + } + this.mmsSampleFiles.add(mmsSampleFilesItem); + return this; + } + + /** + * Returns mmsSampleFiles. + *

+ * Field description: + * List of MMS sample files for the campaign. Each entry can be either a URL to an external file or a UUID of a previously uploaded document. Maximum 5 files allowed. Supported file types: .bmp, .dib, .gif, .jpeg, .jpg, .m2a, .m4a, .m4b, .m4p, .m4r, .m4v, .mp1, .mp2, .mp3, .mp4, .mpa, .oga, .ogg, .ogm, .ogv, .ogx, .png, .spx, .txt, .wav, .webm. + * + * @return mmsSampleFiles + */ + @JsonProperty("mmsSampleFiles") + public List getMmsSampleFiles() { + return mmsSampleFiles; + } + + /** + * Sets mmsSampleFiles. + *

+ * Field description: + * List of MMS sample files for the campaign. Each entry can be either a URL to an external file or a UUID of a previously uploaded document. Maximum 5 files allowed. Supported file types: .bmp, .dib, .gif, .jpeg, .jpg, .m2a, .m4a, .m4b, .m4p, .m4r, .m4v, .mp1, .mp2, .mp3, .mp4, .mpa, .oga, .ogg, .ogm, .ogv, .ogx, .png, .spx, .txt, .wav, .webm. + * + * @param mmsSampleFiles + */ + @JsonProperty("mmsSampleFiles") + public void setMmsSampleFiles(List mmsSampleFiles) { + this.mmsSampleFiles = mmsSampleFiles; + } + + /** + * Sets supportingDocuments. + *

+ * Field description: + * List of supporting documents for the campaign. Each entry can be either a URL to an external document or a UUID of a previously uploaded document. Maximum 5 documents allowed. Supported file types: .bmp, .dib, .docx, .htm, .html, .jpeg, .jpg, .odt, .pdf, .png, .raw, .rtf, .tif, .tiff, .txt, .xml. + * + * @param supportingDocuments + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign supportingDocuments(List supportingDocuments) { + this.supportingDocuments = supportingDocuments; + return this; + } + + /** + * Adds and item into supportingDocuments. + *

+ * Field description: + * List of supporting documents for the campaign. Each entry can be either a URL to an external document or a UUID of a previously uploaded document. Maximum 5 documents allowed. Supported file types: .bmp, .dib, .docx, .htm, .html, .jpeg, .jpg, .odt, .pdf, .png, .raw, .rtf, .tif, .tiff, .txt, .xml. + * + * @param supportingDocumentsItem The item to be added to the list. + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign addSupportingDocumentsItem(String supportingDocumentsItem) { + if (this.supportingDocuments == null) { + this.supportingDocuments = new ArrayList<>(); + } + this.supportingDocuments.add(supportingDocumentsItem); + return this; + } + + /** + * Returns supportingDocuments. + *

+ * Field description: + * List of supporting documents for the campaign. Each entry can be either a URL to an external document or a UUID of a previously uploaded document. Maximum 5 documents allowed. Supported file types: .bmp, .dib, .docx, .htm, .html, .jpeg, .jpg, .odt, .pdf, .png, .raw, .rtf, .tif, .tiff, .txt, .xml. + * + * @return supportingDocuments + */ + @JsonProperty("supportingDocuments") + public List getSupportingDocuments() { + return supportingDocuments; + } + + /** + * Sets supportingDocuments. + *

+ * Field description: + * List of supporting documents for the campaign. Each entry can be either a URL to an external document or a UUID of a previously uploaded document. Maximum 5 documents allowed. Supported file types: .bmp, .dib, .docx, .htm, .html, .jpeg, .jpg, .odt, .pdf, .png, .raw, .rtf, .tif, .tiff, .txt, .xml. + * + * @param supportingDocuments + */ + @JsonProperty("supportingDocuments") + public void setSupportingDocuments(List supportingDocuments) { + this.supportingDocuments = supportingDocuments; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeys + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign numberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + return this; + } + + /** + * Adds and item into numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeysItem The item to be added to the list. + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign addNumberKeysItem(String numberKeysItem) { + if (this.numberKeys == null) { + this.numberKeys = new LinkedHashSet<>(); + } + this.numberKeys.add(numberKeysItem); + return this; + } + + /** + * Returns numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @return numberKeys + */ + @JsonProperty("numberKeys") + public Set getNumberKeys() { + return numberKeys; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeys + */ + @JsonProperty("numberKeys") + public void setNumberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + } + + /** + * Sets numbers. + *

+ * Field description: + * US 10DLC numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 14232180111. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbers + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign numbers(Set numbers) { + this.numbers = numbers; + return this; + } + + /** + * Adds and item into numbers. + *

+ * Field description: + * US 10DLC numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 14232180111. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbersItem The item to be added to the list. + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign addNumbersItem(String numbersItem) { + if (this.numbers == null) { + this.numbers = new LinkedHashSet<>(); + } + this.numbers.add(numbersItem); + return this; + } + + /** + * Returns numbers. + *

+ * Field description: + * US 10DLC numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 14232180111. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @return numbers + */ + @JsonProperty("numbers") + public Set getNumbers() { + return numbers; + } + + /** + * Sets numbers. + *

+ * Field description: + * US 10DLC numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 14232180111. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbers + */ + @JsonProperty("numbers") + public void setNumbers(Set numbers) { + this.numbers = numbers; + } + + /** + * Sets numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviews + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign numberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + return this; + } + + /** + * Adds and item into numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviewsItem The item to be added to the list. + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign addNumberPreviewsItem(NumbersNumberPreview numberPreviewsItem) { + if (this.numberPreviews == null) { + this.numberPreviews = new LinkedHashSet<>(); + } + this.numberPreviews.add(numberPreviewsItem); + return this; + } + + /** + * Returns numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @return numberPreviews + */ + @JsonProperty("numberPreviews") + public Set getNumberPreviews() { + return numberPreviews; + } + + /** + * Sets numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviews + */ + @JsonProperty("numberPreviews") + public void setNumberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + } + + /** + * Sets numberPool. + * + * @param numberPool + * @return This {@link NumbersTenDlcCampaign instance}. + */ + public NumbersTenDlcCampaign numberPool(NumbersNumberPool numberPool) { + this.numberPool = numberPool; + return this; + } + + /** + * Returns numberPool. + * + * @return numberPool + */ + @JsonProperty("numberPool") + public NumbersNumberPool getNumberPool() { + return numberPool; + } + + /** + * Sets numberPool. + * + * @param numberPool + */ + @JsonProperty("numberPool") + public void setNumberPool(NumbersNumberPool numberPool) { + this.numberPool = numberPool; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersTenDlcCampaign numbersTenDlcCampaign = (NumbersTenDlcCampaign) o; + return Objects.equals(this.brandId, numbersTenDlcCampaign.brandId) + && Objects.equals(this.brandPreview, numbersTenDlcCampaign.brandPreview) + && Objects.equals(this.appealData, numbersTenDlcCampaign.appealData) + && Objects.equals(this.programSummary, numbersTenDlcCampaign.programSummary) + && Objects.equals(this.confirmationMessage, numbersTenDlcCampaign.confirmationMessage) + && Objects.equals(this.exampleMessages, numbersTenDlcCampaign.exampleMessages) + && Objects.equals(this.helpMessage, numbersTenDlcCampaign.helpMessage) + && Objects.equals(this.stopMessage, numbersTenDlcCampaign.stopMessage) + && Objects.equals(this.messageTypes, numbersTenDlcCampaign.messageTypes) + && Objects.equals(this.termsAndConditionsUrl, numbersTenDlcCampaign.termsAndConditionsUrl) + && Objects.equals(this.optIns, numbersTenDlcCampaign.optIns) + && Objects.equals(this.ageGated, numbersTenDlcCampaign.ageGated) + && Objects.equals(this.customerCarePhone, numbersTenDlcCampaign.customerCarePhone) + && Objects.equals(this.lowVolume, numbersTenDlcCampaign.lowVolume) + && Objects.equals(this.useCases, numbersTenDlcCampaign.useCases) + && Objects.equals(this.directLending, numbersTenDlcCampaign.directLending) + && Objects.equals(this.embeddedLink, numbersTenDlcCampaign.embeddedLink) + && Objects.equals(this.embeddedPhone, numbersTenDlcCampaign.embeddedPhone) + && Objects.equals(this.customerCareEmail, numbersTenDlcCampaign.customerCareEmail) + && Objects.equals(this.mmsSampleFiles, numbersTenDlcCampaign.mmsSampleFiles) + && Objects.equals(this.supportingDocuments, numbersTenDlcCampaign.supportingDocuments) + && Objects.equals(this.numberKeys, numbersTenDlcCampaign.numberKeys) + && Objects.equals(this.numbers, numbersTenDlcCampaign.numbers) + && Objects.equals(this.numberPreviews, numbersTenDlcCampaign.numberPreviews) + && Objects.equals(this.numberPool, numbersTenDlcCampaign.numberPool) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + brandId, + brandPreview, + appealData, + programSummary, + confirmationMessage, + exampleMessages, + helpMessage, + stopMessage, + messageTypes, + termsAndConditionsUrl, + optIns, + ageGated, + customerCarePhone, + lowVolume, + useCases, + directLending, + embeddedLink, + embeddedPhone, + customerCareEmail, + mmsSampleFiles, + supportingDocuments, + numberKeys, + numbers, + numberPreviews, + numberPool, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersTenDlcCampaign {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" brandId: ") + .append(toIndentedString(brandId)) + .append(newLine) + .append(" brandPreview: ") + .append(toIndentedString(brandPreview)) + .append(newLine) + .append(" appealData: ") + .append(toIndentedString(appealData)) + .append(newLine) + .append(" programSummary: ") + .append(toIndentedString(programSummary)) + .append(newLine) + .append(" confirmationMessage: ") + .append(toIndentedString(confirmationMessage)) + .append(newLine) + .append(" exampleMessages: ") + .append(toIndentedString(exampleMessages)) + .append(newLine) + .append(" helpMessage: ") + .append(toIndentedString(helpMessage)) + .append(newLine) + .append(" stopMessage: ") + .append(toIndentedString(stopMessage)) + .append(newLine) + .append(" messageTypes: ") + .append(toIndentedString(messageTypes)) + .append(newLine) + .append(" termsAndConditionsUrl: ") + .append(toIndentedString(termsAndConditionsUrl)) + .append(newLine) + .append(" optIns: ") + .append(toIndentedString(optIns)) + .append(newLine) + .append(" ageGated: ") + .append(toIndentedString(ageGated)) + .append(newLine) + .append(" customerCarePhone: ") + .append(toIndentedString(customerCarePhone)) + .append(newLine) + .append(" lowVolume: ") + .append(toIndentedString(lowVolume)) + .append(newLine) + .append(" useCases: ") + .append(toIndentedString(useCases)) + .append(newLine) + .append(" directLending: ") + .append(toIndentedString(directLending)) + .append(newLine) + .append(" embeddedLink: ") + .append(toIndentedString(embeddedLink)) + .append(newLine) + .append(" embeddedPhone: ") + .append(toIndentedString(embeddedPhone)) + .append(newLine) + .append(" customerCareEmail: ") + .append(toIndentedString(customerCareEmail)) + .append(newLine) + .append(" mmsSampleFiles: ") + .append(toIndentedString(mmsSampleFiles)) + .append(newLine) + .append(" supportingDocuments: ") + .append(toIndentedString(supportingDocuments)) + .append(newLine) + .append(" numberKeys: ") + .append(toIndentedString(numberKeys)) + .append(newLine) + .append(" numbers: ") + .append(toIndentedString(numbers)) + .append(newLine) + .append(" numberPreviews: ") + .append(toIndentedString(numberPreviews)) + .append(newLine) + .append(" numberPool: ") + .append(toIndentedString(numberPool)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersTenDlcUseCase.java b/src/main/java/com/infobip/model/NumbersTenDlcUseCase.java new file mode 100644 index 0000000..56c3109 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersTenDlcUseCase.java @@ -0,0 +1,56 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The use cases for this campaign. + */ +public enum NumbersTenDlcUseCase { + ALERTS("ALERTS"), + CHAT("CHAT"), + DONATION("DONATION"), + EDUCATION("EDUCATION"), + FRAUD_ALERTS("FRAUD_ALERTS"), + PROMOTIONAL_MARKETING("PROMOTIONAL_MARKETING"), + PUBLIC_SERVICE_ANNOUNCEMENT("PUBLIC_SERVICE_ANNOUNCEMENT"), + TWO_FACTOR_AUTH("TWO_FACTOR_AUTH"), + VOTING_POLLING("VOTING_POLLING"), + POLITICAL("POLITICAL"), + M2M("M2M"); + + private final String value; + + NumbersTenDlcUseCase(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersTenDlcUseCase fromValue(String value) { + for (NumbersTenDlcUseCase enumElement : NumbersTenDlcUseCase.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersTollFreeBrand.java b/src/main/java/com/infobip/model/NumbersTollFreeBrand.java new file mode 100644 index 0000000..4e8596c --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersTollFreeBrand.java @@ -0,0 +1,758 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; + +/** + * Represents NumbersTollFreeBrand model. + */ +public class NumbersTollFreeBrand extends NumbersBrand { + + private String referenceId; + + private NumbersAddress address; + + private String countryCode; + + private String supportPhone; + + private String supportEmail; + + private String businessContactFirstName; + + private String businessContactLastName; + + private String businessDBA; + + private String taxId; + + private String taxIdIssuingCountry; + + /** + * Legal entity type of the business. + */ + public enum LegalEntityTypeEnum { + PRIVATE_COMPANY("PRIVATE_COMPANY"), + PUBLIC_COMPANY("PUBLIC_COMPANY"), + NON_PROFIT("NON_PROFIT"), + GOVERNMENT("GOVERNMENT"), + SOLE_PROPRIETOR("SOLE_PROPRIETOR"); + + private String value; + + LegalEntityTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityTypeEnum fromValue(String value) { + for (LegalEntityTypeEnum enumElement : LegalEntityTypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private LegalEntityTypeEnum legalEntityType; + + private NumbersBusinessRegistrationType businessRegistrationType; + + private String legalName; + + /** + * Constructs a new {@link NumbersTollFreeBrand} instance. + */ + public NumbersTollFreeBrand() { + super("TOLL_FREE_NUMBER"); + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Returns referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @return referenceId + */ + @JsonProperty("referenceId") + public String getReferenceId() { + return referenceId; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the brand. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a brand is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + */ + @JsonProperty("referenceId") + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand address(NumbersAddress address) { + this.address = address; + return this; + } + + /** + * Returns address. + *

+ * The field is required. + * + * @return address + */ + @JsonProperty("address") + public NumbersAddress getAddress() { + return address; + } + + /** + * Sets address. + *

+ * The field is required. + * + * @param address + */ + @JsonProperty("address") + public void setAddress(NumbersAddress address) { + this.address = address; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand supportPhone(String supportPhone) { + this.supportPhone = supportPhone; + return this; + } + + /** + * Returns supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @return supportPhone + */ + @JsonProperty("supportPhone") + public String getSupportPhone() { + return supportPhone; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + */ + @JsonProperty("supportPhone") + public void setSupportPhone(String supportPhone) { + this.supportPhone = supportPhone; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand supportEmail(String supportEmail) { + this.supportEmail = supportEmail; + return this; + } + + /** + * Returns supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return supportEmail + */ + @JsonProperty("supportEmail") + public String getSupportEmail() { + return supportEmail; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + */ + @JsonProperty("supportEmail") + public void setSupportEmail(String supportEmail) { + this.supportEmail = supportEmail; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + *

+ * The field is required. + * + * @param businessContactFirstName + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand businessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + return this; + } + + /** + * Returns businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + *

+ * The field is required. + * + * @return businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public String getBusinessContactFirstName() { + return businessContactFirstName; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + *

+ * The field is required. + * + * @param businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public void setBusinessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + *

+ * The field is required. + * + * @param businessContactLastName + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand businessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + return this; + } + + /** + * Returns businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + *

+ * The field is required. + * + * @return businessContactLastName + */ + @JsonProperty("businessContactLastName") + public String getBusinessContactLastName() { + return businessContactLastName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + *

+ * The field is required. + * + * @param businessContactLastName + */ + @JsonProperty("businessContactLastName") + public void setBusinessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand businessDBA(String businessDBA) { + this.businessDBA = businessDBA; + return this; + } + + /** + * Returns businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @return businessDBA + */ + @JsonProperty("businessDBA") + public String getBusinessDBA() { + return businessDBA; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + */ + @JsonProperty("businessDBA") + public void setBusinessDBA(String businessDBA) { + this.businessDBA = businessDBA; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Returns taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @return taxId + */ + @JsonProperty("taxId") + public String getTaxId() { + return taxId; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + */ + @JsonProperty("taxId") + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand taxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + return this; + } + + /** + * Returns taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @return taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public String getTaxIdIssuingCountry() { + return taxIdIssuingCountry; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public void setTaxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + } + + /** + * Sets legalEntityType. + *

+ * Field description: + * Legal entity type of the business. + *

+ * The field is required. + * + * @param legalEntityType + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand legalEntityType(LegalEntityTypeEnum legalEntityType) { + this.legalEntityType = legalEntityType; + return this; + } + + /** + * Returns legalEntityType. + *

+ * Field description: + * Legal entity type of the business. + *

+ * The field is required. + * + * @return legalEntityType + */ + @JsonProperty("legalEntityType") + public LegalEntityTypeEnum getLegalEntityType() { + return legalEntityType; + } + + /** + * Sets legalEntityType. + *

+ * Field description: + * Legal entity type of the business. + *

+ * The field is required. + * + * @param legalEntityType + */ + @JsonProperty("legalEntityType") + public void setLegalEntityType(LegalEntityTypeEnum legalEntityType) { + this.legalEntityType = legalEntityType; + } + + /** + * Sets businessRegistrationType. + *

+ * The field is required. + * + * @param businessRegistrationType + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand businessRegistrationType(NumbersBusinessRegistrationType businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + return this; + } + + /** + * Returns businessRegistrationType. + *

+ * The field is required. + * + * @return businessRegistrationType + */ + @JsonProperty("businessRegistrationType") + public NumbersBusinessRegistrationType getBusinessRegistrationType() { + return businessRegistrationType; + } + + /** + * Sets businessRegistrationType. + *

+ * The field is required. + * + * @param businessRegistrationType + */ + @JsonProperty("businessRegistrationType") + public void setBusinessRegistrationType(NumbersBusinessRegistrationType businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + * @return This {@link NumbersTollFreeBrand instance}. + */ + public NumbersTollFreeBrand legalName(String legalName) { + this.legalName = legalName; + return this; + } + + /** + * Returns legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @return legalName + */ + @JsonProperty("legalName") + public String getLegalName() { + return legalName; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + */ + @JsonProperty("legalName") + public void setLegalName(String legalName) { + this.legalName = legalName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersTollFreeBrand numbersTollFreeBrand = (NumbersTollFreeBrand) o; + return Objects.equals(this.referenceId, numbersTollFreeBrand.referenceId) + && Objects.equals(this.address, numbersTollFreeBrand.address) + && Objects.equals(this.countryCode, numbersTollFreeBrand.countryCode) + && Objects.equals(this.supportPhone, numbersTollFreeBrand.supportPhone) + && Objects.equals(this.supportEmail, numbersTollFreeBrand.supportEmail) + && Objects.equals(this.businessContactFirstName, numbersTollFreeBrand.businessContactFirstName) + && Objects.equals(this.businessContactLastName, numbersTollFreeBrand.businessContactLastName) + && Objects.equals(this.businessDBA, numbersTollFreeBrand.businessDBA) + && Objects.equals(this.taxId, numbersTollFreeBrand.taxId) + && Objects.equals(this.taxIdIssuingCountry, numbersTollFreeBrand.taxIdIssuingCountry) + && Objects.equals(this.legalEntityType, numbersTollFreeBrand.legalEntityType) + && Objects.equals(this.businessRegistrationType, numbersTollFreeBrand.businessRegistrationType) + && Objects.equals(this.legalName, numbersTollFreeBrand.legalName) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + referenceId, + address, + countryCode, + supportPhone, + supportEmail, + businessContactFirstName, + businessContactLastName, + businessDBA, + taxId, + taxIdIssuingCountry, + legalEntityType, + businessRegistrationType, + legalName, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersTollFreeBrand {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" referenceId: ") + .append(toIndentedString(referenceId)) + .append(newLine) + .append(" address: ") + .append(toIndentedString(address)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" supportPhone: ") + .append(toIndentedString(supportPhone)) + .append(newLine) + .append(" supportEmail: ") + .append(toIndentedString(supportEmail)) + .append(newLine) + .append(" businessContactFirstName: ") + .append(toIndentedString(businessContactFirstName)) + .append(newLine) + .append(" businessContactLastName: ") + .append(toIndentedString(businessContactLastName)) + .append(newLine) + .append(" businessDBA: ") + .append(toIndentedString(businessDBA)) + .append(newLine) + .append(" taxId: ") + .append(toIndentedString(taxId)) + .append(newLine) + .append(" taxIdIssuingCountry: ") + .append(toIndentedString(taxIdIssuingCountry)) + .append(newLine) + .append(" legalEntityType: ") + .append(toIndentedString(legalEntityType)) + .append(newLine) + .append(" businessRegistrationType: ") + .append(toIndentedString(businessRegistrationType)) + .append(newLine) + .append(" legalName: ") + .append(toIndentedString(legalName)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersTollFreeCampaign.java b/src/main/java/com/infobip/model/NumbersTollFreeCampaign.java new file mode 100644 index 0000000..cd269d8 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersTollFreeCampaign.java @@ -0,0 +1,941 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; + +/** + * Represents NumbersTollFreeCampaign model. + */ +public class NumbersTollFreeCampaign extends NumbersCampaign { + + private UUID brandId; + + private NumbersBrandPreview brandPreview; + + private NumbersAppealData appealData; + + private String privacyPolicyUrl; + + private String termsAndConditionsUrl; + + private NumbersTollFreeMessageVolume messageVolume; + + private Set numbers = null; + + private Set numberKeys = null; + + private Set numberPreviews = null; + + private NumbersTollFreeUseCase useCase; + + private String programSummary; + + private String exampleMessage; + + private NumbersOptIns optIns; + + private Set optInImageURLs = new LinkedHashSet<>(); + + private String additionalInformation; + + private String customerCareEmail; + + private String campaignVerifyToken; + + /** + * Constructs a new {@link NumbersTollFreeCampaign} instance. + */ + public NumbersTollFreeCampaign() { + super("TOLL_FREE_NUMBER"); + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand to use with the campaign. + *

+ * The field is required. + * + * @param brandId + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign brandId(UUID brandId) { + this.brandId = brandId; + return this; + } + + /** + * Returns brandId. + *

+ * Field description: + * The ID of the brand to use with the campaign. + *

+ * The field is required. + * + * @return brandId + */ + @JsonProperty("brandId") + public UUID getBrandId() { + return brandId; + } + + /** + * Sets brandId. + *

+ * Field description: + * The ID of the brand to use with the campaign. + *

+ * The field is required. + * + * @param brandId + */ + @JsonProperty("brandId") + public void setBrandId(UUID brandId) { + this.brandId = brandId; + } + + /** + * Sets brandPreview. + * + * @param brandPreview + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign brandPreview(NumbersBrandPreview brandPreview) { + this.brandPreview = brandPreview; + return this; + } + + /** + * Returns brandPreview. + * + * @return brandPreview + */ + @JsonProperty("brandPreview") + public NumbersBrandPreview getBrandPreview() { + return brandPreview; + } + + /** + * Sets brandPreview. + * + * @param brandPreview + */ + @JsonProperty("brandPreview") + public void setBrandPreview(NumbersBrandPreview brandPreview) { + this.brandPreview = brandPreview; + } + + /** + * Sets appealData. + * + * @param appealData + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign appealData(NumbersAppealData appealData) { + this.appealData = appealData; + return this; + } + + /** + * Returns appealData. + * + * @return appealData + */ + @JsonProperty("appealData") + public NumbersAppealData getAppealData() { + return appealData; + } + + /** + * Sets appealData. + * + * @param appealData + */ + @JsonProperty("appealData") + public void setAppealData(NumbersAppealData appealData) { + this.appealData = appealData; + } + + /** + * Sets privacyPolicyUrl. + *

+ * Field description: + * Public URL to the privacy policy that outlines how user data is collected, stored, and used. + * + * @param privacyPolicyUrl + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign privacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + return this; + } + + /** + * Returns privacyPolicyUrl. + *

+ * Field description: + * Public URL to the privacy policy that outlines how user data is collected, stored, and used. + * + * @return privacyPolicyUrl + */ + @JsonProperty("privacyPolicyUrl") + public String getPrivacyPolicyUrl() { + return privacyPolicyUrl; + } + + /** + * Sets privacyPolicyUrl. + *

+ * Field description: + * Public URL to the privacy policy that outlines how user data is collected, stored, and used. + * + * @param privacyPolicyUrl + */ + @JsonProperty("privacyPolicyUrl") + public void setPrivacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + } + + /** + * Sets termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + * + * @param termsAndConditionsUrl + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign termsAndConditionsUrl(String termsAndConditionsUrl) { + this.termsAndConditionsUrl = termsAndConditionsUrl; + return this; + } + + /** + * Returns termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + * + * @return termsAndConditionsUrl + */ + @JsonProperty("termsAndConditionsUrl") + public String getTermsAndConditionsUrl() { + return termsAndConditionsUrl; + } + + /** + * Sets termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + * + * @param termsAndConditionsUrl + */ + @JsonProperty("termsAndConditionsUrl") + public void setTermsAndConditionsUrl(String termsAndConditionsUrl) { + this.termsAndConditionsUrl = termsAndConditionsUrl; + } + + /** + * Sets messageVolume. + *

+ * The field is required. + * + * @param messageVolume + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign messageVolume(NumbersTollFreeMessageVolume messageVolume) { + this.messageVolume = messageVolume; + return this; + } + + /** + * Returns messageVolume. + *

+ * The field is required. + * + * @return messageVolume + */ + @JsonProperty("messageVolume") + public NumbersTollFreeMessageVolume getMessageVolume() { + return messageVolume; + } + + /** + * Sets messageVolume. + *

+ * The field is required. + * + * @param messageVolume + */ + @JsonProperty("messageVolume") + public void setMessageVolume(NumbersTollFreeMessageVolume messageVolume) { + this.messageVolume = messageVolume; + } + + /** + * Sets numbers. + *

+ * Field description: + * US TFN numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 18881234567. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbers + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign numbers(Set numbers) { + this.numbers = numbers; + return this; + } + + /** + * Adds and item into numbers. + *

+ * Field description: + * US TFN numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 18881234567. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbersItem The item to be added to the list. + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign addNumbersItem(String numbersItem) { + if (this.numbers == null) { + this.numbers = new LinkedHashSet<>(); + } + this.numbers.add(numbersItem); + return this; + } + + /** + * Returns numbers. + *

+ * Field description: + * US TFN numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 18881234567. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @return numbers + */ + @JsonProperty("numbers") + public Set getNumbers() { + return numbers; + } + + /** + * Sets numbers. + *

+ * Field description: + * US TFN numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 18881234567. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbers + */ + @JsonProperty("numbers") + public void setNumbers(Set numbers) { + this.numbers = numbers; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeys + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign numberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + return this; + } + + /** + * Adds and item into numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeysItem The item to be added to the list. + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign addNumberKeysItem(String numberKeysItem) { + if (this.numberKeys == null) { + this.numberKeys = new LinkedHashSet<>(); + } + this.numberKeys.add(numberKeysItem); + return this; + } + + /** + * Returns numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @return numberKeys + */ + @JsonProperty("numberKeys") + public Set getNumberKeys() { + return numberKeys; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + * + * @param numberKeys + */ + @JsonProperty("numberKeys") + public void setNumberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + } + + /** + * Sets numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviews + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign numberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + return this; + } + + /** + * Adds and item into numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviewsItem The item to be added to the list. + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign addNumberPreviewsItem(NumbersNumberPreview numberPreviewsItem) { + if (this.numberPreviews == null) { + this.numberPreviews = new LinkedHashSet<>(); + } + this.numberPreviews.add(numberPreviewsItem); + return this; + } + + /** + * Returns numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @return numberPreviews + */ + @JsonProperty("numberPreviews") + public Set getNumberPreviews() { + return numberPreviews; + } + + /** + * Sets numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviews + */ + @JsonProperty("numberPreviews") + public void setNumberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + } + + /** + * Sets useCase. + *

+ * The field is required. + * + * @param useCase + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign useCase(NumbersTollFreeUseCase useCase) { + this.useCase = useCase; + return this; + } + + /** + * Returns useCase. + *

+ * The field is required. + * + * @return useCase + */ + @JsonProperty("useCase") + public NumbersTollFreeUseCase getUseCase() { + return useCase; + } + + /** + * Sets useCase. + *

+ * The field is required. + * + * @param useCase + */ + @JsonProperty("useCase") + public void setUseCase(NumbersTollFreeUseCase useCase) { + this.useCase = useCase; + } + + /** + * Sets programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @param programSummary + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign programSummary(String programSummary) { + this.programSummary = programSummary; + return this; + } + + /** + * Returns programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @return programSummary + */ + @JsonProperty("programSummary") + public String getProgramSummary() { + return programSummary; + } + + /** + * Sets programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @param programSummary + */ + @JsonProperty("programSummary") + public void setProgramSummary(String programSummary) { + this.programSummary = programSummary; + } + + /** + * Sets exampleMessage. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @param exampleMessage + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign exampleMessage(String exampleMessage) { + this.exampleMessage = exampleMessage; + return this; + } + + /** + * Returns exampleMessage. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @return exampleMessage + */ + @JsonProperty("exampleMessage") + public String getExampleMessage() { + return exampleMessage; + } + + /** + * Sets exampleMessage. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @param exampleMessage + */ + @JsonProperty("exampleMessage") + public void setExampleMessage(String exampleMessage) { + this.exampleMessage = exampleMessage; + } + + /** + * Sets optIns. + *

+ * The field is required. + * + * @param optIns + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign optIns(NumbersOptIns optIns) { + this.optIns = optIns; + return this; + } + + /** + * Returns optIns. + *

+ * The field is required. + * + * @return optIns + */ + @JsonProperty("optIns") + public NumbersOptIns getOptIns() { + return optIns; + } + + /** + * Sets optIns. + *

+ * The field is required. + * + * @param optIns + */ + @JsonProperty("optIns") + public void setOptIns(NumbersOptIns optIns) { + this.optIns = optIns; + } + + /** + * Sets optInImageURLs. + *

+ * Field description: + * List of URLs linking to screenshots that show how end-users opt in to receive messages. + *

+ * The field is required. + * + * @param optInImageURLs + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign optInImageURLs(Set optInImageURLs) { + this.optInImageURLs = optInImageURLs; + return this; + } + + /** + * Adds and item into optInImageURLs. + *

+ * Field description: + * List of URLs linking to screenshots that show how end-users opt in to receive messages. + *

+ * The field is required. + * + * @param optInImageURLsItem The item to be added to the list. + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign addOptInImageURLsItem(String optInImageURLsItem) { + if (this.optInImageURLs == null) { + this.optInImageURLs = new LinkedHashSet<>(); + } + this.optInImageURLs.add(optInImageURLsItem); + return this; + } + + /** + * Returns optInImageURLs. + *

+ * Field description: + * List of URLs linking to screenshots that show how end-users opt in to receive messages. + *

+ * The field is required. + * + * @return optInImageURLs + */ + @JsonProperty("optInImageURLs") + public Set getOptInImageURLs() { + return optInImageURLs; + } + + /** + * Sets optInImageURLs. + *

+ * Field description: + * List of URLs linking to screenshots that show how end-users opt in to receive messages. + *

+ * The field is required. + * + * @param optInImageURLs + */ + @JsonProperty("optInImageURLs") + public void setOptInImageURLs(Set optInImageURLs) { + this.optInImageURLs = optInImageURLs; + } + + /** + * Sets additionalInformation. + *

+ * Field description: + * Free-form field for any extra details relevant to the campaign—such as custom use cases or compliance clarification. + * + * @param additionalInformation + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign additionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Returns additionalInformation. + *

+ * Field description: + * Free-form field for any extra details relevant to the campaign—such as custom use cases or compliance clarification. + * + * @return additionalInformation + */ + @JsonProperty("additionalInformation") + public String getAdditionalInformation() { + return additionalInformation; + } + + /** + * Sets additionalInformation. + *

+ * Field description: + * Free-form field for any extra details relevant to the campaign—such as custom use cases or compliance clarification. + * + * @param additionalInformation + */ + @JsonProperty("additionalInformation") + public void setAdditionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + } + + /** + * Sets customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param customerCareEmail + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign customerCareEmail(String customerCareEmail) { + this.customerCareEmail = customerCareEmail; + return this; + } + + /** + * Returns customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return customerCareEmail + */ + @JsonProperty("customerCareEmail") + public String getCustomerCareEmail() { + return customerCareEmail; + } + + /** + * Sets customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param customerCareEmail + */ + @JsonProperty("customerCareEmail") + public void setCustomerCareEmail(String customerCareEmail) { + this.customerCareEmail = customerCareEmail; + } + + /** + * Sets campaignVerifyToken. + *

+ * Field description: + * Campaign Verify token for POLITICAL campaigns. + * + * @param campaignVerifyToken + * @return This {@link NumbersTollFreeCampaign instance}. + */ + public NumbersTollFreeCampaign campaignVerifyToken(String campaignVerifyToken) { + this.campaignVerifyToken = campaignVerifyToken; + return this; + } + + /** + * Returns campaignVerifyToken. + *

+ * Field description: + * Campaign Verify token for POLITICAL campaigns. + * + * @return campaignVerifyToken + */ + @JsonProperty("campaignVerifyToken") + public String getCampaignVerifyToken() { + return campaignVerifyToken; + } + + /** + * Sets campaignVerifyToken. + *

+ * Field description: + * Campaign Verify token for POLITICAL campaigns. + * + * @param campaignVerifyToken + */ + @JsonProperty("campaignVerifyToken") + public void setCampaignVerifyToken(String campaignVerifyToken) { + this.campaignVerifyToken = campaignVerifyToken; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersTollFreeCampaign numbersTollFreeCampaign = (NumbersTollFreeCampaign) o; + return Objects.equals(this.brandId, numbersTollFreeCampaign.brandId) + && Objects.equals(this.brandPreview, numbersTollFreeCampaign.brandPreview) + && Objects.equals(this.appealData, numbersTollFreeCampaign.appealData) + && Objects.equals(this.privacyPolicyUrl, numbersTollFreeCampaign.privacyPolicyUrl) + && Objects.equals(this.termsAndConditionsUrl, numbersTollFreeCampaign.termsAndConditionsUrl) + && Objects.equals(this.messageVolume, numbersTollFreeCampaign.messageVolume) + && Objects.equals(this.numbers, numbersTollFreeCampaign.numbers) + && Objects.equals(this.numberKeys, numbersTollFreeCampaign.numberKeys) + && Objects.equals(this.numberPreviews, numbersTollFreeCampaign.numberPreviews) + && Objects.equals(this.useCase, numbersTollFreeCampaign.useCase) + && Objects.equals(this.programSummary, numbersTollFreeCampaign.programSummary) + && Objects.equals(this.exampleMessage, numbersTollFreeCampaign.exampleMessage) + && Objects.equals(this.optIns, numbersTollFreeCampaign.optIns) + && Objects.equals(this.optInImageURLs, numbersTollFreeCampaign.optInImageURLs) + && Objects.equals(this.additionalInformation, numbersTollFreeCampaign.additionalInformation) + && Objects.equals(this.customerCareEmail, numbersTollFreeCampaign.customerCareEmail) + && Objects.equals(this.campaignVerifyToken, numbersTollFreeCampaign.campaignVerifyToken) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + brandId, + brandPreview, + appealData, + privacyPolicyUrl, + termsAndConditionsUrl, + messageVolume, + numbers, + numberKeys, + numberPreviews, + useCase, + programSummary, + exampleMessage, + optIns, + optInImageURLs, + additionalInformation, + customerCareEmail, + campaignVerifyToken, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersTollFreeCampaign {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" brandId: ") + .append(toIndentedString(brandId)) + .append(newLine) + .append(" brandPreview: ") + .append(toIndentedString(brandPreview)) + .append(newLine) + .append(" appealData: ") + .append(toIndentedString(appealData)) + .append(newLine) + .append(" privacyPolicyUrl: ") + .append(toIndentedString(privacyPolicyUrl)) + .append(newLine) + .append(" termsAndConditionsUrl: ") + .append(toIndentedString(termsAndConditionsUrl)) + .append(newLine) + .append(" messageVolume: ") + .append(toIndentedString(messageVolume)) + .append(newLine) + .append(" numbers: ") + .append(toIndentedString(numbers)) + .append(newLine) + .append(" numberKeys: ") + .append(toIndentedString(numberKeys)) + .append(newLine) + .append(" numberPreviews: ") + .append(toIndentedString(numberPreviews)) + .append(newLine) + .append(" useCase: ") + .append(toIndentedString(useCase)) + .append(newLine) + .append(" programSummary: ") + .append(toIndentedString(programSummary)) + .append(newLine) + .append(" exampleMessage: ") + .append(toIndentedString(exampleMessage)) + .append(newLine) + .append(" optIns: ") + .append(toIndentedString(optIns)) + .append(newLine) + .append(" optInImageURLs: ") + .append(toIndentedString(optInImageURLs)) + .append(newLine) + .append(" additionalInformation: ") + .append(toIndentedString(additionalInformation)) + .append(newLine) + .append(" customerCareEmail: ") + .append(toIndentedString(customerCareEmail)) + .append(newLine) + .append(" campaignVerifyToken: ") + .append(toIndentedString(campaignVerifyToken)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersTollFreeMessageVolume.java b/src/main/java/com/infobip/model/NumbersTollFreeMessageVolume.java new file mode 100644 index 0000000..aecd3a6 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersTollFreeMessageVolume.java @@ -0,0 +1,56 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersTollFreeMessageVolume enumeration. + */ +public enum NumbersTollFreeMessageVolume { + TEN("TEN"), + HUNDRED("HUNDRED"), + THOUSAND("THOUSAND"), + TEN_THOUSAND("TEN_THOUSAND"), + HUNDRED_THOUSAND("HUNDRED_THOUSAND"), + TWO_HUNDRED_FIFTY_THOUSAND("TWO_HUNDRED_FIFTY_THOUSAND"), + FIVE_HUNDRED_THOUSAND("FIVE_HUNDRED_THOUSAND"), + SEVEN_HUNDRED_FIFTY_THOUSAND("SEVEN_HUNDRED_FIFTY_THOUSAND"), + ONE_MILLION("ONE_MILLION"), + FIVE_MILLION("FIVE_MILLION"), + TEN_MILLION_PLUS("TEN_MILLION_PLUS"); + + private final String value; + + NumbersTollFreeMessageVolume(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersTollFreeMessageVolume fromValue(String value) { + for (NumbersTollFreeMessageVolume enumElement : NumbersTollFreeMessageVolume.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersTollFreeUnifiedNumberCampaignApiModel.java b/src/main/java/com/infobip/model/NumbersTollFreeUnifiedNumberCampaignApiModel.java new file mode 100644 index 0000000..f12588f --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersTollFreeUnifiedNumberCampaignApiModel.java @@ -0,0 +1,2122 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; + +/** + * Represents NumbersTollFreeUnifiedNumberCampaignApiModel model. + */ +public class NumbersTollFreeUnifiedNumberCampaignApiModel { + + private UUID id; + + private String referenceId; + + private String applicationId; + + private String entityId; + + private String name; + + private OffsetDateTime createdDate; + + private OffsetDateTime lastModifiedDate; + + private NumbersCampaignStage stage; + + private NumbersPriorityInfo priority; + + /** + * Represents type enumeration. + */ + public enum TypeEnum { + TOLL_FREE_UNIFIED_NUMBER("TOLL_FREE_UNIFIED_NUMBER"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private NumbersCampaignFeedback campaignFeedback; + + private String privacyPolicyUrl; + + private String termsAndConditionsUrl; + + private NumbersTollFreeMessageVolume messageVolume; + + private Set numbers = null; + + private Set numberKeys = new LinkedHashSet<>(); + + private Set numberPreviews = null; + + private NumbersTollFreeUseCase useCase; + + private String programSummary; + + private String exampleMessage; + + private NumbersOptIns optIns; + + private Set optInImageURLs = new LinkedHashSet<>(); + + private String additionalInformation; + + private String countryCode; + + private NumbersAddress address; + + private String supportPhone; + + private String supportEmail; + + private String businessContactFirstName; + + private String businessContactLastName; + + private String legalName; + + private String businessDBA; + + private String businessName; + + private String businessWebsite; + + private String customerCareEmail; + + private String taxId; + + private String taxIdIssuingCountry; + + /** + * Legal entity type of the business. + */ + public enum LegalEntityTypeEnum { + PRIVATE_COMPANY("PRIVATE_COMPANY"), + PUBLIC_COMPANY("PUBLIC_COMPANY"), + NON_PROFIT("NON_PROFIT"), + GOVERNMENT("GOVERNMENT"), + SOLE_PROPRIETOR("SOLE_PROPRIETOR"); + + private String value; + + LegalEntityTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityTypeEnum fromValue(String value) { + for (LegalEntityTypeEnum enumElement : LegalEntityTypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private LegalEntityTypeEnum legalEntityType; + + private NumbersBusinessRegistrationType businessRegistrationType; + + private String campaignVerifyToken; + + private UUID priorityId; + + /** + * Sets id. + *

+ * Field description: + * The identifier for the campaign. + * + * @param id + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel id(UUID id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The identifier for the campaign. + * + * @return id + */ + @JsonProperty("id") + public UUID getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The identifier for the campaign. + * + * @param id + */ + @JsonProperty("id") + public void setId(UUID id) { + this.id = id; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the campaign. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a campaign is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Returns referenceId. + *

+ * Field description: + * Unique user defined ID for the campaign. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a campaign is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @return referenceId + */ + @JsonProperty("referenceId") + public String getReferenceId() { + return referenceId; + } + + /** + * Sets referenceId. + *

+ * Field description: + * Unique user defined ID for the campaign. While not required, it is recommended to supply a referenceId as the uniqueness constraint will help ensure a campaign is not accidentally created multiple times. Subsequent create requests with the same referenceId will be rejected with an error. + * + * @param referenceId + */ + @JsonProperty("referenceId") + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @param applicationId + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * CPaaS X property identifying an application, a use case or an environment on your system. It should only be set if you are using CPaaS X Applications with your traffic. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @param entityId + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * CPaaS X property identifying an unique actor on your system. Should only be set if you are using CPaaS X Applications with your traffic. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * Sets name. + *

+ * Field description: + * The name of the campaign. + *

+ * The field is required. + * + * @param name + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * The name of the campaign. + *

+ * The field is required. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * The name of the campaign. + *

+ * The field is required. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets createdDate. + *

+ * Field description: + * The date and time when the campaign was created. + * + * @param createdDate + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel createdDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Returns createdDate. + *

+ * Field description: + * The date and time when the campaign was created. + * + * @return createdDate + */ + @JsonProperty("createdDate") + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + /** + * Sets createdDate. + *

+ * Field description: + * The date and time when the campaign was created. + * + * @param createdDate + */ + @JsonProperty("createdDate") + public void setCreatedDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + /** + * Sets lastModifiedDate. + *

+ * Field description: + * The date and time when the campaign was last modified. + * + * @param lastModifiedDate + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel lastModifiedDate(OffsetDateTime lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + return this; + } + + /** + * Returns lastModifiedDate. + *

+ * Field description: + * The date and time when the campaign was last modified. + * + * @return lastModifiedDate + */ + @JsonProperty("lastModifiedDate") + public OffsetDateTime getLastModifiedDate() { + return lastModifiedDate; + } + + /** + * Sets lastModifiedDate. + *

+ * Field description: + * The date and time when the campaign was last modified. + * + * @param lastModifiedDate + */ + @JsonProperty("lastModifiedDate") + public void setLastModifiedDate(OffsetDateTime lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } + + /** + * Sets stage. + * + * @param stage + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel stage(NumbersCampaignStage stage) { + this.stage = stage; + return this; + } + + /** + * Returns stage. + * + * @return stage + */ + @JsonProperty("stage") + public NumbersCampaignStage getStage() { + return stage; + } + + /** + * Sets stage. + * + * @param stage + */ + @JsonProperty("stage") + public void setStage(NumbersCampaignStage stage) { + this.stage = stage; + } + + /** + * Sets priority. + * + * @param priority + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel priority(NumbersPriorityInfo priority) { + this.priority = priority; + return this; + } + + /** + * Returns priority. + * + * @return priority + */ + @JsonProperty("priority") + public NumbersPriorityInfo getPriority() { + return priority; + } + + /** + * Sets priority. + * + * @param priority + */ + @JsonProperty("priority") + public void setPriority(NumbersPriorityInfo priority) { + this.priority = priority; + } + + /** + * Sets type. + * + * @param type + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets campaignFeedback. + * + * @param campaignFeedback + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel campaignFeedback(NumbersCampaignFeedback campaignFeedback) { + this.campaignFeedback = campaignFeedback; + return this; + } + + /** + * Returns campaignFeedback. + * + * @return campaignFeedback + */ + @JsonProperty("campaignFeedback") + public NumbersCampaignFeedback getCampaignFeedback() { + return campaignFeedback; + } + + /** + * Sets campaignFeedback. + * + * @param campaignFeedback + */ + @JsonProperty("campaignFeedback") + public void setCampaignFeedback(NumbersCampaignFeedback campaignFeedback) { + this.campaignFeedback = campaignFeedback; + } + + /** + * Sets privacyPolicyUrl. + *

+ * Field description: + * Public URL to the privacy policy that outlines how user data is collected, stored, and used. + * + * @param privacyPolicyUrl + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel privacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + return this; + } + + /** + * Returns privacyPolicyUrl. + *

+ * Field description: + * Public URL to the privacy policy that outlines how user data is collected, stored, and used. + * + * @return privacyPolicyUrl + */ + @JsonProperty("privacyPolicyUrl") + public String getPrivacyPolicyUrl() { + return privacyPolicyUrl; + } + + /** + * Sets privacyPolicyUrl. + *

+ * Field description: + * Public URL to the privacy policy that outlines how user data is collected, stored, and used. + * + * @param privacyPolicyUrl + */ + @JsonProperty("privacyPolicyUrl") + public void setPrivacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + } + + /** + * Sets termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + * + * @param termsAndConditionsUrl + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel termsAndConditionsUrl(String termsAndConditionsUrl) { + this.termsAndConditionsUrl = termsAndConditionsUrl; + return this; + } + + /** + * Returns termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + * + * @return termsAndConditionsUrl + */ + @JsonProperty("termsAndConditionsUrl") + public String getTermsAndConditionsUrl() { + return termsAndConditionsUrl; + } + + /** + * Sets termsAndConditionsUrl. + *

+ * Field description: + * URL where the terms and conditions of the campaign are located. + * + * @param termsAndConditionsUrl + */ + @JsonProperty("termsAndConditionsUrl") + public void setTermsAndConditionsUrl(String termsAndConditionsUrl) { + this.termsAndConditionsUrl = termsAndConditionsUrl; + } + + /** + * Sets messageVolume. + *

+ * The field is required. + * + * @param messageVolume + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel messageVolume(NumbersTollFreeMessageVolume messageVolume) { + this.messageVolume = messageVolume; + return this; + } + + /** + * Returns messageVolume. + *

+ * The field is required. + * + * @return messageVolume + */ + @JsonProperty("messageVolume") + public NumbersTollFreeMessageVolume getMessageVolume() { + return messageVolume; + } + + /** + * Sets messageVolume. + *

+ * The field is required. + * + * @param messageVolume + */ + @JsonProperty("messageVolume") + public void setMessageVolume(NumbersTollFreeMessageVolume messageVolume) { + this.messageVolume = messageVolume; + } + + /** + * Sets numbers. + *

+ * Field description: + * US TFN numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 18881234567. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbers + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel numbers(Set numbers) { + this.numbers = numbers; + return this; + } + + /** + * Adds and item into numbers. + *

+ * Field description: + * US TFN numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 18881234567. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbersItem The item to be added to the list. + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel addNumbersItem(String numbersItem) { + if (this.numbers == null) { + this.numbers = new LinkedHashSet<>(); + } + this.numbers.add(numbersItem); + return this; + } + + /** + * Returns numbers. + *

+ * Field description: + * US TFN numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 18881234567. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @return numbers + */ + @JsonProperty("numbers") + public Set getNumbers() { + return numbers; + } + + /** + * Sets numbers. + *

+ * Field description: + * US TFN numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 18881234567. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. + * + * @param numbers + */ + @JsonProperty("numbers") + public void setNumbers(Set numbers) { + this.numbers = numbers; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + *

+ * The field is required. + * + * @param numberKeys + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel numberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + return this; + } + + /** + * Adds and item into numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + *

+ * The field is required. + * + * @param numberKeysItem The item to be added to the list. + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel addNumberKeysItem(String numberKeysItem) { + if (this.numberKeys == null) { + this.numberKeys = new LinkedHashSet<>(); + } + this.numberKeys.add(numberKeysItem); + return this; + } + + /** + * Returns numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + *

+ * The field is required. + * + * @return numberKeys + */ + @JsonProperty("numberKeys") + public Set getNumberKeys() { + return numberKeys; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one TFN number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. + *

+ * The field is required. + * + * @param numberKeys + */ + @JsonProperty("numberKeys") + public void setNumberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + } + + /** + * Sets numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviews + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel numberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + return this; + } + + /** + * Adds and item into numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviewsItem The item to be added to the list. + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel addNumberPreviewsItem(NumbersNumberPreview numberPreviewsItem) { + if (this.numberPreviews == null) { + this.numberPreviews = new LinkedHashSet<>(); + } + this.numberPreviews.add(numberPreviewsItem); + return this; + } + + /** + * Returns numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @return numberPreviews + */ + @JsonProperty("numberPreviews") + public Set getNumberPreviews() { + return numberPreviews; + } + + /** + * Sets numberPreviews. + *

+ * Field description: + * The number(s) to use with the campaign. This property is read-only and ignored in POST/PUT calls. + * + * @param numberPreviews + */ + @JsonProperty("numberPreviews") + public void setNumberPreviews(Set numberPreviews) { + this.numberPreviews = numberPreviews; + } + + /** + * Sets useCase. + *

+ * The field is required. + * + * @param useCase + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel useCase(NumbersTollFreeUseCase useCase) { + this.useCase = useCase; + return this; + } + + /** + * Returns useCase. + *

+ * The field is required. + * + * @return useCase + */ + @JsonProperty("useCase") + public NumbersTollFreeUseCase getUseCase() { + return useCase; + } + + /** + * Sets useCase. + *

+ * The field is required. + * + * @param useCase + */ + @JsonProperty("useCase") + public void setUseCase(NumbersTollFreeUseCase useCase) { + this.useCase = useCase; + } + + /** + * Sets programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @param programSummary + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel programSummary(String programSummary) { + this.programSummary = programSummary; + return this; + } + + /** + * Returns programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @return programSummary + */ + @JsonProperty("programSummary") + public String getProgramSummary() { + return programSummary; + } + + /** + * Sets programSummary. + *

+ * Field description: + * A brief description of the purpose of the campaign. + *

+ * The field is required. + * + * @param programSummary + */ + @JsonProperty("programSummary") + public void setProgramSummary(String programSummary) { + this.programSummary = programSummary; + } + + /** + * Sets exampleMessage. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @param exampleMessage + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel exampleMessage(String exampleMessage) { + this.exampleMessage = exampleMessage; + return this; + } + + /** + * Returns exampleMessage. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @return exampleMessage + */ + @JsonProperty("exampleMessage") + public String getExampleMessage() { + return exampleMessage; + } + + /** + * Sets exampleMessage. + *

+ * Field description: + * The example message(s) a user may receive from this campaign. Each example message must be at least 20 characters long. + *

+ * The field is required. + * + * @param exampleMessage + */ + @JsonProperty("exampleMessage") + public void setExampleMessage(String exampleMessage) { + this.exampleMessage = exampleMessage; + } + + /** + * Sets optIns. + *

+ * The field is required. + * + * @param optIns + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel optIns(NumbersOptIns optIns) { + this.optIns = optIns; + return this; + } + + /** + * Returns optIns. + *

+ * The field is required. + * + * @return optIns + */ + @JsonProperty("optIns") + public NumbersOptIns getOptIns() { + return optIns; + } + + /** + * Sets optIns. + *

+ * The field is required. + * + * @param optIns + */ + @JsonProperty("optIns") + public void setOptIns(NumbersOptIns optIns) { + this.optIns = optIns; + } + + /** + * Sets optInImageURLs. + *

+ * Field description: + * List of URLs linking to screenshots that show how end-users opt in to receive messages. + *

+ * The field is required. + * + * @param optInImageURLs + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel optInImageURLs(Set optInImageURLs) { + this.optInImageURLs = optInImageURLs; + return this; + } + + /** + * Adds and item into optInImageURLs. + *

+ * Field description: + * List of URLs linking to screenshots that show how end-users opt in to receive messages. + *

+ * The field is required. + * + * @param optInImageURLsItem The item to be added to the list. + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel addOptInImageURLsItem(String optInImageURLsItem) { + if (this.optInImageURLs == null) { + this.optInImageURLs = new LinkedHashSet<>(); + } + this.optInImageURLs.add(optInImageURLsItem); + return this; + } + + /** + * Returns optInImageURLs. + *

+ * Field description: + * List of URLs linking to screenshots that show how end-users opt in to receive messages. + *

+ * The field is required. + * + * @return optInImageURLs + */ + @JsonProperty("optInImageURLs") + public Set getOptInImageURLs() { + return optInImageURLs; + } + + /** + * Sets optInImageURLs. + *

+ * Field description: + * List of URLs linking to screenshots that show how end-users opt in to receive messages. + *

+ * The field is required. + * + * @param optInImageURLs + */ + @JsonProperty("optInImageURLs") + public void setOptInImageURLs(Set optInImageURLs) { + this.optInImageURLs = optInImageURLs; + } + + /** + * Sets additionalInformation. + *

+ * Field description: + * Free-form field for any extra details relevant to the campaign—such as custom use cases or compliance clarification. + * + * @param additionalInformation + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel additionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Returns additionalInformation. + *

+ * Field description: + * Free-form field for any extra details relevant to the campaign—such as custom use cases or compliance clarification. + * + * @return additionalInformation + */ + @JsonProperty("additionalInformation") + public String getAdditionalInformation() { + return additionalInformation; + } + + /** + * Sets additionalInformation. + *

+ * Field description: + * Free-form field for any extra details relevant to the campaign—such as custom use cases or compliance clarification. + * + * @param additionalInformation + */ + @JsonProperty("additionalInformation") + public void setAdditionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + * + * @param countryCode + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * The country where the brand is located. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * The country where the brand is located. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets address. + * + * @param address + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel address(NumbersAddress address) { + this.address = address; + return this; + } + + /** + * Returns address. + * + * @return address + */ + @JsonProperty("address") + public NumbersAddress getAddress() { + return address; + } + + /** + * Sets address. + * + * @param address + */ + @JsonProperty("address") + public void setAddress(NumbersAddress address) { + this.address = address; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel supportPhone(String supportPhone) { + this.supportPhone = supportPhone; + return this; + } + + /** + * Returns supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @return supportPhone + */ + @JsonProperty("supportPhone") + public String getSupportPhone() { + return supportPhone; + } + + /** + * Sets supportPhone. + *

+ * Field description: + * The business phone number to contact about brand compliance issues. + *

+ * The field is required. + * + * @param supportPhone + */ + @JsonProperty("supportPhone") + public void setSupportPhone(String supportPhone) { + this.supportPhone = supportPhone; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel supportEmail(String supportEmail) { + this.supportEmail = supportEmail; + return this; + } + + /** + * Returns supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return supportEmail + */ + @JsonProperty("supportEmail") + public String getSupportEmail() { + return supportEmail; + } + + /** + * Sets supportEmail. + *

+ * Field description: + * The business email address to contact about brand compliance issues. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param supportEmail + */ + @JsonProperty("supportEmail") + public void setSupportEmail(String supportEmail) { + this.supportEmail = supportEmail; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + *

+ * The field is required. + * + * @param businessContactFirstName + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel businessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + return this; + } + + /** + * Returns businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + *

+ * The field is required. + * + * @return businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public String getBusinessContactFirstName() { + return businessContactFirstName; + } + + /** + * Sets businessContactFirstName. + *

+ * Field description: + * First name of the primary contact person for the brand or business entity. Used for verification or compliance outreach. + *

+ * The field is required. + * + * @param businessContactFirstName + */ + @JsonProperty("businessContactFirstName") + public void setBusinessContactFirstName(String businessContactFirstName) { + this.businessContactFirstName = businessContactFirstName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + *

+ * The field is required. + * + * @param businessContactLastName + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel businessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + return this; + } + + /** + * Returns businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + *

+ * The field is required. + * + * @return businessContactLastName + */ + @JsonProperty("businessContactLastName") + public String getBusinessContactLastName() { + return businessContactLastName; + } + + /** + * Sets businessContactLastName. + *

+ * Field description: + * Last name of the primary contact person for the brand or business entity. + *

+ * The field is required. + * + * @param businessContactLastName + */ + @JsonProperty("businessContactLastName") + public void setBusinessContactLastName(String businessContactLastName) { + this.businessContactLastName = businessContactLastName; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel legalName(String legalName) { + this.legalName = legalName; + return this; + } + + /** + * Returns legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @return legalName + */ + @JsonProperty("legalName") + public String getLegalName() { + return legalName; + } + + /** + * Sets legalName. + *

+ * Field description: + * The legal name of the brand. + *

+ * The field is required. + * + * @param legalName + */ + @JsonProperty("legalName") + public void setLegalName(String legalName) { + this.legalName = legalName; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel businessDBA(String businessDBA) { + this.businessDBA = businessDBA; + return this; + } + + /** + * Returns businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @return businessDBA + */ + @JsonProperty("businessDBA") + public String getBusinessDBA() { + return businessDBA; + } + + /** + * Sets businessDBA. + *

+ * Field description: + * 'Doing Business As' name if different from the legal business name. + * + * @param businessDBA + */ + @JsonProperty("businessDBA") + public void setBusinessDBA(String businessDBA) { + this.businessDBA = businessDBA; + } + + /** + * Sets businessName. + *

+ * Field description: + * The customer defined name of brand or business entity. + * + * @param businessName + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel businessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** + * Returns businessName. + *

+ * Field description: + * The customer defined name of brand or business entity. + * + * @return businessName + */ + @JsonProperty("businessName") + public String getBusinessName() { + return businessName; + } + + /** + * Sets businessName. + *

+ * Field description: + * The customer defined name of brand or business entity. + * + * @param businessName + */ + @JsonProperty("businessName") + public void setBusinessName(String businessName) { + this.businessName = businessName; + } + + /** + * Sets businessWebsite. + *

+ * Field description: + * The website for the brand or business entity. + *

+ * The field is required. + * + * @param businessWebsite + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel businessWebsite(String businessWebsite) { + this.businessWebsite = businessWebsite; + return this; + } + + /** + * Returns businessWebsite. + *

+ * Field description: + * The website for the brand or business entity. + *

+ * The field is required. + * + * @return businessWebsite + */ + @JsonProperty("businessWebsite") + public String getBusinessWebsite() { + return businessWebsite; + } + + /** + * Sets businessWebsite. + *

+ * Field description: + * The website for the brand or business entity. + *

+ * The field is required. + * + * @param businessWebsite + */ + @JsonProperty("businessWebsite") + public void setBusinessWebsite(String businessWebsite) { + this.businessWebsite = businessWebsite; + } + + /** + * Sets customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param customerCareEmail + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel customerCareEmail(String customerCareEmail) { + this.customerCareEmail = customerCareEmail; + return this; + } + + /** + * Returns customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @return customerCareEmail + */ + @JsonProperty("customerCareEmail") + public String getCustomerCareEmail() { + return customerCareEmail; + } + + /** + * Sets customerCareEmail. + *

+ * Field description: + * The email address the user may contact to get customer care. Must be a well formed email address that does not include a '=' character. + *

+ * The field is required. + * + * @param customerCareEmail + */ + @JsonProperty("customerCareEmail") + public void setCustomerCareEmail(String customerCareEmail) { + this.customerCareEmail = customerCareEmail; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Returns taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @return taxId + */ + @JsonProperty("taxId") + public String getTaxId() { + return taxId; + } + + /** + * Sets taxId. + *

+ * Field description: + * The tax identifier for the brand. + *

+ * The field is required. + * + * @param taxId + */ + @JsonProperty("taxId") + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel taxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + return this; + } + + /** + * Returns taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @return taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public String getTaxIdIssuingCountry() { + return taxIdIssuingCountry; + } + + /** + * Sets taxIdIssuingCountry. + *

+ * Field description: + * The country where tax identifier is issued. If not specified, the value from countryCode will be used. + * + * @param taxIdIssuingCountry + */ + @JsonProperty("taxIdIssuingCountry") + public void setTaxIdIssuingCountry(String taxIdIssuingCountry) { + this.taxIdIssuingCountry = taxIdIssuingCountry; + } + + /** + * Sets legalEntityType. + *

+ * Field description: + * Legal entity type of the business. + *

+ * The field is required. + * + * @param legalEntityType + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel legalEntityType(LegalEntityTypeEnum legalEntityType) { + this.legalEntityType = legalEntityType; + return this; + } + + /** + * Returns legalEntityType. + *

+ * Field description: + * Legal entity type of the business. + *

+ * The field is required. + * + * @return legalEntityType + */ + @JsonProperty("legalEntityType") + public LegalEntityTypeEnum getLegalEntityType() { + return legalEntityType; + } + + /** + * Sets legalEntityType. + *

+ * Field description: + * Legal entity type of the business. + *

+ * The field is required. + * + * @param legalEntityType + */ + @JsonProperty("legalEntityType") + public void setLegalEntityType(LegalEntityTypeEnum legalEntityType) { + this.legalEntityType = legalEntityType; + } + + /** + * Sets businessRegistrationType. + *

+ * The field is required. + * + * @param businessRegistrationType + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel businessRegistrationType( + NumbersBusinessRegistrationType businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + return this; + } + + /** + * Returns businessRegistrationType. + *

+ * The field is required. + * + * @return businessRegistrationType + */ + @JsonProperty("businessRegistrationType") + public NumbersBusinessRegistrationType getBusinessRegistrationType() { + return businessRegistrationType; + } + + /** + * Sets businessRegistrationType. + *

+ * The field is required. + * + * @param businessRegistrationType + */ + @JsonProperty("businessRegistrationType") + public void setBusinessRegistrationType(NumbersBusinessRegistrationType businessRegistrationType) { + this.businessRegistrationType = businessRegistrationType; + } + + /** + * Sets campaignVerifyToken. + *

+ * Field description: + * Campaign Verify token for POLITICAL campaigns. + * + * @param campaignVerifyToken + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel campaignVerifyToken(String campaignVerifyToken) { + this.campaignVerifyToken = campaignVerifyToken; + return this; + } + + /** + * Returns campaignVerifyToken. + *

+ * Field description: + * Campaign Verify token for POLITICAL campaigns. + * + * @return campaignVerifyToken + */ + @JsonProperty("campaignVerifyToken") + public String getCampaignVerifyToken() { + return campaignVerifyToken; + } + + /** + * Sets campaignVerifyToken. + *

+ * Field description: + * Campaign Verify token for POLITICAL campaigns. + * + * @param campaignVerifyToken + */ + @JsonProperty("campaignVerifyToken") + public void setCampaignVerifyToken(String campaignVerifyToken) { + this.campaignVerifyToken = campaignVerifyToken; + } + + /** + * Sets priorityId. + *

+ * Field description: + * Priority information used in latest campaign review. + * + * @param priorityId + * @return This {@link NumbersTollFreeUnifiedNumberCampaignApiModel instance}. + */ + public NumbersTollFreeUnifiedNumberCampaignApiModel priorityId(UUID priorityId) { + this.priorityId = priorityId; + return this; + } + + /** + * Returns priorityId. + *

+ * Field description: + * Priority information used in latest campaign review. + * + * @return priorityId + */ + @JsonProperty("priorityId") + public UUID getPriorityId() { + return priorityId; + } + + /** + * Sets priorityId. + *

+ * Field description: + * Priority information used in latest campaign review. + * + * @param priorityId + */ + @JsonProperty("priorityId") + public void setPriorityId(UUID priorityId) { + this.priorityId = priorityId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersTollFreeUnifiedNumberCampaignApiModel numbersTollFreeUnifiedNumberCampaignApiModel = + (NumbersTollFreeUnifiedNumberCampaignApiModel) o; + return Objects.equals(this.id, numbersTollFreeUnifiedNumberCampaignApiModel.id) + && Objects.equals(this.referenceId, numbersTollFreeUnifiedNumberCampaignApiModel.referenceId) + && Objects.equals(this.applicationId, numbersTollFreeUnifiedNumberCampaignApiModel.applicationId) + && Objects.equals(this.entityId, numbersTollFreeUnifiedNumberCampaignApiModel.entityId) + && Objects.equals(this.name, numbersTollFreeUnifiedNumberCampaignApiModel.name) + && Objects.equals(this.createdDate, numbersTollFreeUnifiedNumberCampaignApiModel.createdDate) + && Objects.equals(this.lastModifiedDate, numbersTollFreeUnifiedNumberCampaignApiModel.lastModifiedDate) + && Objects.equals(this.stage, numbersTollFreeUnifiedNumberCampaignApiModel.stage) + && Objects.equals(this.priority, numbersTollFreeUnifiedNumberCampaignApiModel.priority) + && Objects.equals(this.type, numbersTollFreeUnifiedNumberCampaignApiModel.type) + && Objects.equals(this.campaignFeedback, numbersTollFreeUnifiedNumberCampaignApiModel.campaignFeedback) + && Objects.equals(this.privacyPolicyUrl, numbersTollFreeUnifiedNumberCampaignApiModel.privacyPolicyUrl) + && Objects.equals( + this.termsAndConditionsUrl, numbersTollFreeUnifiedNumberCampaignApiModel.termsAndConditionsUrl) + && Objects.equals(this.messageVolume, numbersTollFreeUnifiedNumberCampaignApiModel.messageVolume) + && Objects.equals(this.numbers, numbersTollFreeUnifiedNumberCampaignApiModel.numbers) + && Objects.equals(this.numberKeys, numbersTollFreeUnifiedNumberCampaignApiModel.numberKeys) + && Objects.equals(this.numberPreviews, numbersTollFreeUnifiedNumberCampaignApiModel.numberPreviews) + && Objects.equals(this.useCase, numbersTollFreeUnifiedNumberCampaignApiModel.useCase) + && Objects.equals(this.programSummary, numbersTollFreeUnifiedNumberCampaignApiModel.programSummary) + && Objects.equals(this.exampleMessage, numbersTollFreeUnifiedNumberCampaignApiModel.exampleMessage) + && Objects.equals(this.optIns, numbersTollFreeUnifiedNumberCampaignApiModel.optIns) + && Objects.equals(this.optInImageURLs, numbersTollFreeUnifiedNumberCampaignApiModel.optInImageURLs) + && Objects.equals( + this.additionalInformation, numbersTollFreeUnifiedNumberCampaignApiModel.additionalInformation) + && Objects.equals(this.countryCode, numbersTollFreeUnifiedNumberCampaignApiModel.countryCode) + && Objects.equals(this.address, numbersTollFreeUnifiedNumberCampaignApiModel.address) + && Objects.equals(this.supportPhone, numbersTollFreeUnifiedNumberCampaignApiModel.supportPhone) + && Objects.equals(this.supportEmail, numbersTollFreeUnifiedNumberCampaignApiModel.supportEmail) + && Objects.equals( + this.businessContactFirstName, + numbersTollFreeUnifiedNumberCampaignApiModel.businessContactFirstName) + && Objects.equals( + this.businessContactLastName, + numbersTollFreeUnifiedNumberCampaignApiModel.businessContactLastName) + && Objects.equals(this.legalName, numbersTollFreeUnifiedNumberCampaignApiModel.legalName) + && Objects.equals(this.businessDBA, numbersTollFreeUnifiedNumberCampaignApiModel.businessDBA) + && Objects.equals(this.businessName, numbersTollFreeUnifiedNumberCampaignApiModel.businessName) + && Objects.equals(this.businessWebsite, numbersTollFreeUnifiedNumberCampaignApiModel.businessWebsite) + && Objects.equals( + this.customerCareEmail, numbersTollFreeUnifiedNumberCampaignApiModel.customerCareEmail) + && Objects.equals(this.taxId, numbersTollFreeUnifiedNumberCampaignApiModel.taxId) + && Objects.equals( + this.taxIdIssuingCountry, numbersTollFreeUnifiedNumberCampaignApiModel.taxIdIssuingCountry) + && Objects.equals(this.legalEntityType, numbersTollFreeUnifiedNumberCampaignApiModel.legalEntityType) + && Objects.equals( + this.businessRegistrationType, + numbersTollFreeUnifiedNumberCampaignApiModel.businessRegistrationType) + && Objects.equals( + this.campaignVerifyToken, numbersTollFreeUnifiedNumberCampaignApiModel.campaignVerifyToken) + && Objects.equals(this.priorityId, numbersTollFreeUnifiedNumberCampaignApiModel.priorityId); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + referenceId, + applicationId, + entityId, + name, + createdDate, + lastModifiedDate, + stage, + priority, + type, + campaignFeedback, + privacyPolicyUrl, + termsAndConditionsUrl, + messageVolume, + numbers, + numberKeys, + numberPreviews, + useCase, + programSummary, + exampleMessage, + optIns, + optInImageURLs, + additionalInformation, + countryCode, + address, + supportPhone, + supportEmail, + businessContactFirstName, + businessContactLastName, + legalName, + businessDBA, + businessName, + businessWebsite, + customerCareEmail, + taxId, + taxIdIssuingCountry, + legalEntityType, + businessRegistrationType, + campaignVerifyToken, + priorityId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersTollFreeUnifiedNumberCampaignApiModel {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" referenceId: ") + .append(toIndentedString(referenceId)) + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" createdDate: ") + .append(toIndentedString(createdDate)) + .append(newLine) + .append(" lastModifiedDate: ") + .append(toIndentedString(lastModifiedDate)) + .append(newLine) + .append(" stage: ") + .append(toIndentedString(stage)) + .append(newLine) + .append(" priority: ") + .append(toIndentedString(priority)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" campaignFeedback: ") + .append(toIndentedString(campaignFeedback)) + .append(newLine) + .append(" privacyPolicyUrl: ") + .append(toIndentedString(privacyPolicyUrl)) + .append(newLine) + .append(" termsAndConditionsUrl: ") + .append(toIndentedString(termsAndConditionsUrl)) + .append(newLine) + .append(" messageVolume: ") + .append(toIndentedString(messageVolume)) + .append(newLine) + .append(" numbers: ") + .append(toIndentedString(numbers)) + .append(newLine) + .append(" numberKeys: ") + .append(toIndentedString(numberKeys)) + .append(newLine) + .append(" numberPreviews: ") + .append(toIndentedString(numberPreviews)) + .append(newLine) + .append(" useCase: ") + .append(toIndentedString(useCase)) + .append(newLine) + .append(" programSummary: ") + .append(toIndentedString(programSummary)) + .append(newLine) + .append(" exampleMessage: ") + .append(toIndentedString(exampleMessage)) + .append(newLine) + .append(" optIns: ") + .append(toIndentedString(optIns)) + .append(newLine) + .append(" optInImageURLs: ") + .append(toIndentedString(optInImageURLs)) + .append(newLine) + .append(" additionalInformation: ") + .append(toIndentedString(additionalInformation)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" address: ") + .append(toIndentedString(address)) + .append(newLine) + .append(" supportPhone: ") + .append(toIndentedString(supportPhone)) + .append(newLine) + .append(" supportEmail: ") + .append(toIndentedString(supportEmail)) + .append(newLine) + .append(" businessContactFirstName: ") + .append(toIndentedString(businessContactFirstName)) + .append(newLine) + .append(" businessContactLastName: ") + .append(toIndentedString(businessContactLastName)) + .append(newLine) + .append(" legalName: ") + .append(toIndentedString(legalName)) + .append(newLine) + .append(" businessDBA: ") + .append(toIndentedString(businessDBA)) + .append(newLine) + .append(" businessName: ") + .append(toIndentedString(businessName)) + .append(newLine) + .append(" businessWebsite: ") + .append(toIndentedString(businessWebsite)) + .append(newLine) + .append(" customerCareEmail: ") + .append(toIndentedString(customerCareEmail)) + .append(newLine) + .append(" taxId: ") + .append(toIndentedString(taxId)) + .append(newLine) + .append(" taxIdIssuingCountry: ") + .append(toIndentedString(taxIdIssuingCountry)) + .append(newLine) + .append(" legalEntityType: ") + .append(toIndentedString(legalEntityType)) + .append(newLine) + .append(" businessRegistrationType: ") + .append(toIndentedString(businessRegistrationType)) + .append(newLine) + .append(" campaignVerifyToken: ") + .append(toIndentedString(campaignVerifyToken)) + .append(newLine) + .append(" priorityId: ") + .append(toIndentedString(priorityId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersTollFreeUseCase.java b/src/main/java/com/infobip/model/NumbersTollFreeUseCase.java new file mode 100644 index 0000000..356b32d --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersTollFreeUseCase.java @@ -0,0 +1,90 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents NumbersTollFreeUseCase enumeration. + */ +public enum NumbersTollFreeUseCase { + TWO_FA("TWO_FA"), + APP_NOTIFICATIONS("APP_NOTIFICATIONS"), + APPOINTMENTS("APPOINTMENTS"), + AUCTIONS("AUCTIONS"), + AUTO_DEALERSHIP_SERVICES("AUTO_DEALERSHIP_SERVICES"), + BANKING("BANKING"), + BILLING("BILLING"), + BOOKING_CONFIRMATIONS("BOOKING_CONFIRMATIONS"), + BUSINESS_UPDATES("BUSINESS_UPDATES"), + COVID_19_ALERTS("COVID_19_ALERTS"), + CAREER_TRAINING("CAREER_TRAINING"), + CHATBOT("CHATBOT"), + CONVERSATIONAL_ALERTS("CONVERSATIONAL_ALERTS"), + COURIER_SERVICES_DELIVERIES("COURIER_SERVICES_DELIVERIES"), + EDUCATIONAL("EDUCATIONAL"), + EMERGENCY_ALERTS("EMERGENCY_ALERTS"), + EMPLOYEE_ALERTS_NOTIFICATIONS("EMPLOYEE_ALERTS_NOTIFICATIONS"), + EVENTS_PLANNING("EVENTS_PLANNING"), + FINANCIAL_SERVICES("FINANCIAL_SERVICES"), + FRAUD_ALERTS("FRAUD_ALERTS"), + FUNDRAISING("FUNDRAISING"), + GENERAL_MARKETING("GENERAL_MARKETING"), + HR_STAFFING("HR_STAFFING"), + HEALTHCARE("HEALTHCARE"), + HOUSING_COMMUNITY_UPDATES("HOUSING_COMMUNITY_UPDATES"), + INSURANCE_SERVICES("INSURANCE_SERVICES"), + JOB_ALERTS("JOB_ALERTS"), + LEGAL_SERVICES("LEGAL_SERVICES"), + MIXED("MIXED"), + MOTIVATIONAL_REMINDERS("MOTIVATIONAL_REMINDERS"), + NOTARY_NOTIFICATIONS("NOTARY_NOTIFICATIONS"), + NOTIFICATIONS("NOTIFICATIONS"), + ORDER_NOTIFICATIONS("ORDER_NOTIFICATIONS"), + POLITICAL("POLITICAL"), + PUBLIC_WORKS("PUBLIC_WORKS"), + REAL_ESTATE_SERVICES("REAL_ESTATE_SERVICES"), + RECEIPT_NOTIFICATIONS("RECEIPT_NOTIFICATIONS"), + RELIGIOUS_SERVICES("RELIGIOUS_SERVICES"), + REPAIR_DIAGNOSTICS_ALERTS("REPAIR_DIAGNOSTICS_ALERTS"), + REWARDS_PROGRAM("REWARDS_PROGRAM"), + SURVEYS("SURVEYS"), + SYSTEM_ALERTS("SYSTEM_ALERTS"), + WAITLIST_ALERTS("WAITLIST_ALERTS"), + WEBINAR_REMINDERS("WEBINAR_REMINDERS"), + WORKSHOP_ALERTS("WORKSHOP_ALERTS"); + + private final String value; + + NumbersTollFreeUseCase(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersTollFreeUseCase fromValue(String value) { + for (NumbersTollFreeUseCase enumElement : NumbersTollFreeUseCase.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersUpdateCampaignRegistrationRequest.java b/src/main/java/com/infobip/model/NumbersUpdateCampaignRegistrationRequest.java new file mode 100644 index 0000000..8d8c687 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersUpdateCampaignRegistrationRequest.java @@ -0,0 +1,183 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Represents NumbersUpdateCampaignRegistrationRequest model. + */ +public class NumbersUpdateCampaignRegistrationRequest { + + private Set numberKeys = null; + + private Set numbers = null; + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. Total limit for Number pooling campaigns is 35000 instead of 49. You can add or remove up to 5000 numbers at a time for Number pooling campaigns. + * + * @param numberKeys + * @return This {@link NumbersUpdateCampaignRegistrationRequest instance}. + */ + public NumbersUpdateCampaignRegistrationRequest numberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + return this; + } + + /** + * Adds and item into numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. Total limit for Number pooling campaigns is 35000 instead of 49. You can add or remove up to 5000 numbers at a time for Number pooling campaigns. + * + * @param numberKeysItem The item to be added to the list. + * @return This {@link NumbersUpdateCampaignRegistrationRequest instance}. + */ + public NumbersUpdateCampaignRegistrationRequest addNumberKeysItem(String numberKeysItem) { + if (this.numberKeys == null) { + this.numberKeys = new LinkedHashSet<>(); + } + this.numberKeys.add(numberKeysItem); + return this; + } + + /** + * Returns numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. Total limit for Number pooling campaigns is 35000 instead of 49. You can add or remove up to 5000 numbers at a time for Number pooling campaigns. + * + * @return numberKeys + */ + @JsonProperty("numberKeys") + public Set getNumberKeys() { + return numberKeys; + } + + /** + * Sets numberKeys. + *

+ * Field description: + * The numberKey(s) of the numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. Alternatively, you can use the 'numbers' property to specify the numbers directly, but note that 'numberKeys' property takes precedence if both are specified. Total limit for Number pooling campaigns is 35000 instead of 49. You can add or remove up to 5000 numbers at a time for Number pooling campaigns. + * + * @param numberKeys + */ + @JsonProperty("numberKeys") + public void setNumberKeys(Set numberKeys) { + this.numberKeys = numberKeys; + } + + /** + * Sets numbers. + *

+ * Field description: + * US 10DLC numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 14232180111. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. Total limit for Number pooling campaigns is 35000 instead of 49. You can add or remove up to 5000 numbers at a time for Number pooling campaigns. + * + * @param numbers + * @return This {@link NumbersUpdateCampaignRegistrationRequest instance}. + */ + public NumbersUpdateCampaignRegistrationRequest numbers(Set numbers) { + this.numbers = numbers; + return this; + } + + /** + * Adds and item into numbers. + *

+ * Field description: + * US 10DLC numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 14232180111. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. Total limit for Number pooling campaigns is 35000 instead of 49. You can add or remove up to 5000 numbers at a time for Number pooling campaigns. + * + * @param numbersItem The item to be added to the list. + * @return This {@link NumbersUpdateCampaignRegistrationRequest instance}. + */ + public NumbersUpdateCampaignRegistrationRequest addNumbersItem(String numbersItem) { + if (this.numbers == null) { + this.numbers = new LinkedHashSet<>(); + } + this.numbers.add(numbersItem); + return this; + } + + /** + * Returns numbers. + *

+ * Field description: + * US 10DLC numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 14232180111. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. Total limit for Number pooling campaigns is 35000 instead of 49. You can add or remove up to 5000 numbers at a time for Number pooling campaigns. + * + * @return numbers + */ + @JsonProperty("numbers") + public Set getNumbers() { + return numbers; + } + + /** + * Sets numbers. + *

+ * Field description: + * US 10DLC numbers to use with the campaign. Campaign must have at least one 10DLC number associated before it can be submitted for review. You may only use numbers that are associated with your account inside the Infobip platform. Numbers must be provided in international format including the country prefix, e.g. 14232180111. This property can be used instead of 'numberKeys' to specify the campaign numbers; it is not returned in the API response. Total limit for Number pooling campaigns is 35000 instead of 49. You can add or remove up to 5000 numbers at a time for Number pooling campaigns. + * + * @param numbers + */ + @JsonProperty("numbers") + public void setNumbers(Set numbers) { + this.numbers = numbers; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersUpdateCampaignRegistrationRequest numbersUpdateCampaignRegistrationRequest = + (NumbersUpdateCampaignRegistrationRequest) o; + return Objects.equals(this.numberKeys, numbersUpdateCampaignRegistrationRequest.numberKeys) + && Objects.equals(this.numbers, numbersUpdateCampaignRegistrationRequest.numbers); + } + + @Override + public int hashCode() { + return Objects.hash(numberKeys, numbers); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersUpdateCampaignRegistrationRequest {") + .append(newLine) + .append(" numberKeys: ") + .append(toIndentedString(numberKeys)) + .append(newLine) + .append(" numbers: ") + .append(toIndentedString(numbers)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersUpdateOwnedNumberRequest.java b/src/main/java/com/infobip/model/NumbersUpdateOwnedNumberRequest.java new file mode 100644 index 0000000..81b97ef --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersUpdateOwnedNumberRequest.java @@ -0,0 +1,152 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersUpdateOwnedNumberRequest model. + */ +public class NumbersUpdateOwnedNumberRequest { + + private String applicationId; + + private String entityId; + + /** + * Sets applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the number. + *

+ * The field is required. + * + * @param applicationId + * @return This {@link NumbersUpdateOwnedNumberRequest instance}. + */ + public NumbersUpdateOwnedNumberRequest applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the number. + *

+ * The field is required. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the number. + *

+ * The field is required. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the number. + * + * @param entityId + * @return This {@link NumbersUpdateOwnedNumberRequest instance}. + */ + public NumbersUpdateOwnedNumberRequest entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the number. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the number. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersUpdateOwnedNumberRequest numbersUpdateOwnedNumberRequest = (NumbersUpdateOwnedNumberRequest) o; + return Objects.equals(this.applicationId, numbersUpdateOwnedNumberRequest.applicationId) + && Objects.equals(this.entityId, numbersUpdateOwnedNumberRequest.entityId); + } + + @Override + public int hashCode() { + return Objects.hash(applicationId, entityId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersUpdateOwnedNumberRequest {") + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVerbalOptIn.java b/src/main/java/com/infobip/model/NumbersVerbalOptIn.java new file mode 100644 index 0000000..f3839c2 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVerbalOptIn.java @@ -0,0 +1,106 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The type of opt in that requires a user to verbally confirm. + */ +public class NumbersVerbalOptIn { + + private String callToAction; + + /** + * Sets callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @param callToAction + * @return This {@link NumbersVerbalOptIn instance}. + */ + public NumbersVerbalOptIn callToAction(String callToAction) { + this.callToAction = callToAction; + return this; + } + + /** + * Returns callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @return callToAction + */ + @JsonProperty("callToAction") + public String getCallToAction() { + return callToAction; + } + + /** + * Sets callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @param callToAction + */ + @JsonProperty("callToAction") + public void setCallToAction(String callToAction) { + this.callToAction = callToAction; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersVerbalOptIn numbersVerbalOptIn = (NumbersVerbalOptIn) o; + return Objects.equals(this.callToAction, numbersVerbalOptIn.callToAction); + } + + @Override + public int hashCode() { + return Objects.hash(callToAction); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersVerbalOptIn {") + .append(newLine) + .append(" callToAction: ") + .append(toIndentedString(callToAction)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVertical.java b/src/main/java/com/infobip/model/NumbersVertical.java new file mode 100644 index 0000000..b96c276 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVertical.java @@ -0,0 +1,68 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The vertical in which the brand operates. + */ +public enum NumbersVertical { + AGRICULTURE("AGRICULTURE"), + CONSTRUCTION_AND_MATERIALS("CONSTRUCTION_AND_MATERIALS"), + EDUCATION("EDUCATION"), + ENERGY_AND_UTILITIES("ENERGY_AND_UTILITIES"), + ENTERTAINMENT("ENTERTAINMENT"), + FINANCIAL_SERVICES("FINANCIAL_SERVICES"), + GAMBLING_AND_LOTTERY("GAMBLING_AND_LOTTERY"), + HEALTHCARE_AND_LIFESCIENCES("HEALTHCARE_AND_LIFESCIENCES"), + HOSPITALITY("HOSPITALITY"), + INFORMATION_TECHNOLOGY_SERVICES("INFORMATION_TECHNOLOGY_SERVICES"), + INSURANCE("INSURANCE"), + MANUFACTURING("MANUFACTURING"), + MASS_MEDIA_AND_COMMUNICATION("MASS_MEDIA_AND_COMMUNICATION"), + NON_PROFIT_ORGANIZATION("NON_PROFIT_ORGANIZATION"), + PUBLIC_SECTOR("PUBLIC_SECTOR"), + REAL_ESTATE("REAL_ESTATE"), + RETAIL_AND_CONSUMER_PRODUCTS("RETAIL_AND_CONSUMER_PRODUCTS"), + PROFESSIONAL_SERVICES("PROFESSIONAL_SERVICES"), + HUMAN_RESOURCES_STAFFING_RECRUITMENT("HUMAN_RESOURCES_STAFFING_RECRUITMENT"), + TRANSPORTATION_LOGISTICS("TRANSPORTATION_LOGISTICS"), + POSTAL_DELIVERY("POSTAL_DELIVERY"), + LEGAL("LEGAL"), + POLITICAL("POLITICAL"); + + private final String value; + + NumbersVertical(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersVertical fromValue(String value) { + for (NumbersVertical enumElement : NumbersVertical.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVetImportRequest.java b/src/main/java/com/infobip/model/NumbersVetImportRequest.java new file mode 100644 index 0000000..b0d4d2e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVetImportRequest.java @@ -0,0 +1,91 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Represents NumbersVetImportRequest model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = NumbersAegisVetImportRequest.class, name = "AEGIS_MOBILE"), + @JsonSubTypes.Type(value = NumbersCvVetImportRequest.class, name = "CAMPAIGN_VERIFY"), + @JsonSubTypes.Type(value = NumbersWmcVetImportRequest.class, name = "WMC_GLOBAL"), +}) +public abstract class NumbersVetImportRequest { + + protected final NumbersVettingProvider type; + + /** + * Constructs a new {@link NumbersVetImportRequest} instance. + */ + public NumbersVetImportRequest(String type) { + this.type = NumbersVettingProvider.fromValue(type); + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public NumbersVettingProvider getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersVetImportRequest numbersVetImportRequest = (NumbersVetImportRequest) o; + return Objects.equals(this.type, numbersVetImportRequest.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersVetImportRequest {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVettingProvider.java b/src/main/java/com/infobip/model/NumbersVettingProvider.java new file mode 100644 index 0000000..705380a --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVettingProvider.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Provider for imported brand vet. + */ +public enum NumbersVettingProvider { + AEGIS_MOBILE("AEGIS_MOBILE"), + CAMPAIGN_VERIFY("CAMPAIGN_VERIFY"), + WMC_GLOBAL("WMC_GLOBAL"); + + private final String value; + + NumbersVettingProvider(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersVettingProvider fromValue(String value) { + for (NumbersVettingProvider enumElement : NumbersVettingProvider.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVettingType.java b/src/main/java/com/infobip/model/NumbersVettingType.java new file mode 100644 index 0000000..cdb36cf --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVettingType.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of vet. + */ +public enum NumbersVettingType { + STANDARD("STANDARD"), + ENHANCED("ENHANCED"), + POLITICAL("POLITICAL"); + + private final String value; + + NumbersVettingType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersVettingType fromValue(String value) { + for (NumbersVettingType enumElement : NumbersVettingType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVoiceActionDetails.java b/src/main/java/com/infobip/model/NumbersVoiceActionDetails.java new file mode 100644 index 0000000..8895f76 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVoiceActionDetails.java @@ -0,0 +1,141 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Voice action configuration. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = NumbersForwardToCallRoutingDetails.class, name = "FORWARD_TO_CALL_ROUTING"), + @JsonSubTypes.Type(value = NumbersForwardToIvrActionDetails.class, name = "FORWARD_TO_IVR"), + @JsonSubTypes.Type(value = NumbersForwardToPstnActionDetails.class, name = "FORWARD_TO_PSTN"), + @JsonSubTypes.Type(value = NumbersForwardToSubscriptionDetails.class, name = "FORWARD_TO_SUBSCRIPTION"), + @JsonSubTypes.Type(value = NumbersVoiceForwardToAnswersDetails.class, name = "VOICE_FORWARD_TO_ANSWERS"), + @JsonSubTypes.Type( + value = NumbersVoiceForwardToConversationsDetails.class, + name = "VOICE_FORWARD_TO_CONVERSATIONS"), + @JsonSubTypes.Type(value = NumbersVoiceNumberMaskingActionDetails.class, name = "VOICE_NUMBER_MASKING"), +}) +public abstract class NumbersVoiceActionDetails { + + protected final MoActionType type; + + /** + * Constructs a new {@link NumbersVoiceActionDetails} instance. + */ + public NumbersVoiceActionDetails(String type) { + this.type = MoActionType.fromValue(type); + } + + private String description; + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + /** + * Sets description. + *

+ * Field description: + * Additional action description. + * + * @param description + * @return This {@link NumbersVoiceActionDetails instance}. + */ + public NumbersVoiceActionDetails description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Additional action description. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Additional action description. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersVoiceActionDetails numbersVoiceActionDetails = (NumbersVoiceActionDetails) o; + return Objects.equals(this.type, numbersVoiceActionDetails.type) + && Objects.equals(this.description, numbersVoiceActionDetails.description); + } + + @Override + public int hashCode() { + return Objects.hash(type, description); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersVoiceActionDetails {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVoiceForwardToAnswersDetails.java b/src/main/java/com/infobip/model/NumbersVoiceForwardToAnswersDetails.java new file mode 100644 index 0000000..bcc1889 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVoiceForwardToAnswersDetails.java @@ -0,0 +1,63 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import java.util.Objects; + +/** + * Represents NumbersVoiceForwardToAnswersDetails model. + */ +public class NumbersVoiceForwardToAnswersDetails extends NumbersVoiceActionDetails { + + /** + * Constructs a new {@link NumbersVoiceForwardToAnswersDetails} instance. + */ + public NumbersVoiceForwardToAnswersDetails() { + super("VOICE_FORWARD_TO_ANSWERS"); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersVoiceForwardToAnswersDetails {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVoiceForwardToConversationsDetails.java b/src/main/java/com/infobip/model/NumbersVoiceForwardToConversationsDetails.java new file mode 100644 index 0000000..7aaff55 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVoiceForwardToConversationsDetails.java @@ -0,0 +1,63 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import java.util.Objects; + +/** + * Represents NumbersVoiceForwardToConversationsDetails model. + */ +public class NumbersVoiceForwardToConversationsDetails extends NumbersVoiceActionDetails { + + /** + * Constructs a new {@link NumbersVoiceForwardToConversationsDetails} instance. + */ + public NumbersVoiceForwardToConversationsDetails() { + super("VOICE_FORWARD_TO_CONVERSATIONS"); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersVoiceForwardToConversationsDetails {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVoiceNumberMaskingActionDetails.java b/src/main/java/com/infobip/model/NumbersVoiceNumberMaskingActionDetails.java new file mode 100644 index 0000000..67ace96 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVoiceNumberMaskingActionDetails.java @@ -0,0 +1,120 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersVoiceNumberMaskingActionDetails model. + */ +public class NumbersVoiceNumberMaskingActionDetails extends NumbersVoiceActionDetails { + + private String voiceNumberMaskingConfigKey; + + /** + * Constructs a new {@link NumbersVoiceNumberMaskingActionDetails} instance. + */ + public NumbersVoiceNumberMaskingActionDetails() { + super("VOICE_NUMBER_MASKING"); + } + + /** + * Sets voiceNumberMaskingConfigKey. + *

+ * Field description: + * Unique ID of number masking configuration. + *

+ * The field is required. + * + * @param voiceNumberMaskingConfigKey + * @return This {@link NumbersVoiceNumberMaskingActionDetails instance}. + */ + public NumbersVoiceNumberMaskingActionDetails voiceNumberMaskingConfigKey(String voiceNumberMaskingConfigKey) { + this.voiceNumberMaskingConfigKey = voiceNumberMaskingConfigKey; + return this; + } + + /** + * Returns voiceNumberMaskingConfigKey. + *

+ * Field description: + * Unique ID of number masking configuration. + *

+ * The field is required. + * + * @return voiceNumberMaskingConfigKey + */ + @JsonProperty("voiceNumberMaskingConfigKey") + public String getVoiceNumberMaskingConfigKey() { + return voiceNumberMaskingConfigKey; + } + + /** + * Sets voiceNumberMaskingConfigKey. + *

+ * Field description: + * Unique ID of number masking configuration. + *

+ * The field is required. + * + * @param voiceNumberMaskingConfigKey + */ + @JsonProperty("voiceNumberMaskingConfigKey") + public void setVoiceNumberMaskingConfigKey(String voiceNumberMaskingConfigKey) { + this.voiceNumberMaskingConfigKey = voiceNumberMaskingConfigKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersVoiceNumberMaskingActionDetails numbersVoiceNumberMaskingActionDetails = + (NumbersVoiceNumberMaskingActionDetails) o; + return Objects.equals( + this.voiceNumberMaskingConfigKey, + numbersVoiceNumberMaskingActionDetails.voiceNumberMaskingConfigKey) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(voiceNumberMaskingConfigKey, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersVoiceNumberMaskingActionDetails {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" voiceNumberMaskingConfigKey: ") + .append(toIndentedString(voiceNumberMaskingConfigKey)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersVoiceSetup.java b/src/main/java/com/infobip/model/NumbersVoiceSetup.java new file mode 100644 index 0000000..8856c9e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersVoiceSetup.java @@ -0,0 +1,189 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Voice setup configuration. + */ +public class NumbersVoiceSetup { + + private String applicationId; + + private String entityId; + + private NumbersVoiceActionDetails action; + + /** + * Sets applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the voice setup. + * + * @param applicationId + * @return This {@link NumbersVoiceSetup instance}. + */ + public NumbersVoiceSetup applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the voice setup. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * ID of the Application that would be associated with the voice setup. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the voice setup. + * + * @param entityId + * @return This {@link NumbersVoiceSetup instance}. + */ + public NumbersVoiceSetup entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the voice setup. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * ID of the Entity that would be associated with the voice setup. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * Sets action. + *

+ * The field is required. + * + * @param action + * @return This {@link NumbersVoiceSetup instance}. + */ + public NumbersVoiceSetup action(NumbersVoiceActionDetails action) { + this.action = action; + return this; + } + + /** + * Returns action. + *

+ * The field is required. + * + * @return action + */ + @JsonProperty("action") + public NumbersVoiceActionDetails getAction() { + return action; + } + + /** + * Sets action. + *

+ * The field is required. + * + * @param action + */ + @JsonProperty("action") + public void setAction(NumbersVoiceActionDetails action) { + this.action = action; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersVoiceSetup numbersVoiceSetup = (NumbersVoiceSetup) o; + return Objects.equals(this.applicationId, numbersVoiceSetup.applicationId) + && Objects.equals(this.entityId, numbersVoiceSetup.entityId) + && Objects.equals(this.action, numbersVoiceSetup.action); + } + + @Override + public int hashCode() { + return Objects.hash(applicationId, entityId, action); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersVoiceSetup {") + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append(" action: ") + .append(toIndentedString(action)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersWebOptIn.java b/src/main/java/com/infobip/model/NumbersWebOptIn.java new file mode 100644 index 0000000..87b60a7 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersWebOptIn.java @@ -0,0 +1,143 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The type of opt in that requires a user to follow a URL. + */ +public class NumbersWebOptIn { + + private String callToAction; + + private String url; + + /** + * Sets callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @param callToAction + * @return This {@link NumbersWebOptIn instance}. + */ + public NumbersWebOptIn callToAction(String callToAction) { + this.callToAction = callToAction; + return this; + } + + /** + * Returns callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @return callToAction + */ + @JsonProperty("callToAction") + public String getCallToAction() { + return callToAction; + } + + /** + * Sets callToAction. + *

+ * Field description: + * The message sent to the user to tell them how to subscribe. Must include: • Product description • Message frequency disclosure • Complete terms and conditions OR link to complete terms and conditions • Privacy policy OR link to privacy policy • STOP keyword • The \"Message and data rates may apply\" disclosure + *

+ * The field is required. + * + * @param callToAction + */ + @JsonProperty("callToAction") + public void setCallToAction(String callToAction) { + this.callToAction = callToAction; + } + + /** + * Sets url. + * + * @param url + * @return This {@link NumbersWebOptIn instance}. + */ + public NumbersWebOptIn url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersWebOptIn numbersWebOptIn = (NumbersWebOptIn) o; + return Objects.equals(this.callToAction, numbersWebOptIn.callToAction) + && Objects.equals(this.url, numbersWebOptIn.url); + } + + @Override + public int hashCode() { + return Objects.hash(callToAction, url); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersWebOptIn {") + .append(newLine) + .append(" callToAction: ") + .append(toIndentedString(callToAction)) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/NumbersWebhookBrandRegistrationStatus.java b/src/main/java/com/infobip/model/NumbersWebhookBrandRegistrationStatus.java new file mode 100644 index 0000000..b584a15 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersWebhookBrandRegistrationStatus.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The new brand registration status. + */ +public enum NumbersWebhookBrandRegistrationStatus { + SUCCESS("SUCCESS"), + FAILURE("FAILURE"), + PENDING("PENDING"), + PENDING_2FA("PENDING_2FA"); + + private final String value; + + NumbersWebhookBrandRegistrationStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersWebhookBrandRegistrationStatus fromValue(String value) { + for (NumbersWebhookBrandRegistrationStatus enumElement : NumbersWebhookBrandRegistrationStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersWebhookBrandVetStatus.java b/src/main/java/com/infobip/model/NumbersWebhookBrandVetStatus.java new file mode 100644 index 0000000..9761117 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersWebhookBrandVetStatus.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The new brand vet status. + */ +public enum NumbersWebhookBrandVetStatus { + SUCCESS("SUCCESS"), + FAILURE("FAILURE"); + + private final String value; + + NumbersWebhookBrandVetStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersWebhookBrandVetStatus fromValue(String value) { + for (NumbersWebhookBrandVetStatus enumElement : NumbersWebhookBrandVetStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersWebhookBrandVettingType.java b/src/main/java/com/infobip/model/NumbersWebhookBrandVettingType.java new file mode 100644 index 0000000..30c5317 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersWebhookBrandVettingType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of brand vet. + */ +public enum NumbersWebhookBrandVettingType { + STANDARD("STANDARD"), + ENHANCED("ENHANCED"); + + private final String value; + + NumbersWebhookBrandVettingType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersWebhookBrandVettingType fromValue(String value) { + for (NumbersWebhookBrandVettingType enumElement : NumbersWebhookBrandVettingType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersWebhookCampaignNetworkStatus.java b/src/main/java/com/infobip/model/NumbersWebhookCampaignNetworkStatus.java new file mode 100644 index 0000000..b6978a8 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersWebhookCampaignNetworkStatus.java @@ -0,0 +1,46 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The new campaign registration status for a given network. + */ +public enum NumbersWebhookCampaignNetworkStatus { + ACTIVE("ACTIVE"); + + private final String value; + + NumbersWebhookCampaignNetworkStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersWebhookCampaignNetworkStatus fromValue(String value) { + for (NumbersWebhookCampaignNetworkStatus enumElement : NumbersWebhookCampaignNetworkStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersWebhookCampaignStage.java b/src/main/java/com/infobip/model/NumbersWebhookCampaignStage.java new file mode 100644 index 0000000..7775d2e --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersWebhookCampaignStage.java @@ -0,0 +1,50 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The new campaign registration. + */ +public enum NumbersWebhookCampaignStage { + REGISTERED("REGISTERED"), + REJECTED("REJECTED"), + DEREGISTERED("DEREGISTERED"), + SUBMITTED("SUBMITTED"), + APPROVED_BY_INTERNAL_REVIEWER("APPROVED_BY_INTERNAL_REVIEWER"); + + private final String value; + + NumbersWebhookCampaignStage(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NumbersWebhookCampaignStage fromValue(String value) { + for (NumbersWebhookCampaignStage enumElement : NumbersWebhookCampaignStage.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/NumbersWmcVetImportRequest.java b/src/main/java/com/infobip/model/NumbersWmcVetImportRequest.java new file mode 100644 index 0000000..bfe6857 --- /dev/null +++ b/src/main/java/com/infobip/model/NumbersWmcVetImportRequest.java @@ -0,0 +1,116 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents NumbersWmcVetImportRequest model. + */ +public class NumbersWmcVetImportRequest extends NumbersVetImportRequest { + + private String transactionId; + + /** + * Constructs a new {@link NumbersWmcVetImportRequest} instance. + */ + public NumbersWmcVetImportRequest() { + super("WMC_GLOBAL"); + } + + /** + * Sets transactionId. + *

+ * Field description: + * WMC Global transaction ID + *

+ * The field is required. + * + * @param transactionId + * @return This {@link NumbersWmcVetImportRequest instance}. + */ + public NumbersWmcVetImportRequest transactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * Returns transactionId. + *

+ * Field description: + * WMC Global transaction ID + *

+ * The field is required. + * + * @return transactionId + */ + @JsonProperty("transactionId") + public String getTransactionId() { + return transactionId; + } + + /** + * Sets transactionId. + *

+ * Field description: + * WMC Global transaction ID + *

+ * The field is required. + * + * @param transactionId + */ + @JsonProperty("transactionId") + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumbersWmcVetImportRequest numbersWmcVetImportRequest = (NumbersWmcVetImportRequest) o; + return Objects.equals(this.transactionId, numbersWmcVetImportRequest.transactionId) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(transactionId, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class NumbersWmcVetImportRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" transactionId: ") + .append(toIndentedString(transactionId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/RcsConversationInfo.java b/src/main/java/com/infobip/model/RcsConversationInfo.java new file mode 100644 index 0000000..fec66bf --- /dev/null +++ b/src/main/java/com/infobip/model/RcsConversationInfo.java @@ -0,0 +1,152 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Conversation information associated with the message. + */ +public class RcsConversationInfo { + + private Boolean canInitiate; + + private String id; + + /** + * Sets canInitiate. + *

+ * Field description: + * Indicates whether this message can initiate or trigger a conversation. If the message already belongs to a conversation, the value is false. + *

+ * The field is required. + * + * @param canInitiate + * @return This {@link RcsConversationInfo instance}. + */ + public RcsConversationInfo canInitiate(Boolean canInitiate) { + this.canInitiate = canInitiate; + return this; + } + + /** + * Returns canInitiate. + *

+ * Field description: + * Indicates whether this message can initiate or trigger a conversation. If the message already belongs to a conversation, the value is false. + *

+ * The field is required. + * + * @return canInitiate + */ + @JsonProperty("canInitiate") + public Boolean getCanInitiate() { + return canInitiate; + } + + /** + * Sets canInitiate. + *

+ * Field description: + * Indicates whether this message can initiate or trigger a conversation. If the message already belongs to a conversation, the value is false. + *

+ * The field is required. + * + * @param canInitiate + */ + @JsonProperty("canInitiate") + public void setCanInitiate(Boolean canInitiate) { + this.canInitiate = canInitiate; + } + + /** + * Sets id. + *

+ * Field description: + * Unique conversation identifier. Present when the message belongs to a conversation, null otherwise. + * + * @param id + * @return This {@link RcsConversationInfo instance}. + */ + public RcsConversationInfo id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * Unique conversation identifier. Present when the message belongs to a conversation, null otherwise. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * Unique conversation identifier. Present when the message belongs to a conversation, null otherwise. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RcsConversationInfo rcsConversationInfo = (RcsConversationInfo) o; + return Objects.equals(this.canInitiate, rcsConversationInfo.canInitiate) + && Objects.equals(this.id, rcsConversationInfo.id); + } + + @Override + public int hashCode() { + return Objects.hash(canInitiate, id); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class RcsConversationInfo {") + .append(newLine) + .append(" canInitiate: ") + .append(toIndentedString(canInitiate)) + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/RcsConversationStartedEvent.java b/src/main/java/com/infobip/model/RcsConversationStartedEvent.java new file mode 100644 index 0000000..e98ae0a --- /dev/null +++ b/src/main/java/com/infobip/model/RcsConversationStartedEvent.java @@ -0,0 +1,272 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Collection of conversation started events. + */ +public class RcsConversationStartedEvent { + + private String messageId; + + private RcsTrafficType trafficType; + + private RcsConversationStartedEventContent event; + + private RcsConversationStartedInfo conversation; + + private Platform platform; + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the sent/received message. + *

+ * The field is required. + * + * @param messageId + * @return This {@link RcsConversationStartedEvent instance}. + */ + public RcsConversationStartedEvent messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Returns messageId. + *

+ * Field description: + * The ID that uniquely identifies the sent/received message. + *

+ * The field is required. + * + * @return messageId + */ + @JsonProperty("messageId") + public String getMessageId() { + return messageId; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the sent/received message. + *

+ * The field is required. + * + * @param messageId + */ + @JsonProperty("messageId") + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + /** + * Sets trafficType. + * + * @param trafficType + * @return This {@link RcsConversationStartedEvent instance}. + */ + public RcsConversationStartedEvent trafficType(RcsTrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Returns trafficType. + * + * @return trafficType + */ + @JsonProperty("trafficType") + public RcsTrafficType getTrafficType() { + return trafficType; + } + + /** + * Sets trafficType. + * + * @param trafficType + */ + @JsonProperty("trafficType") + public void setTrafficType(RcsTrafficType trafficType) { + this.trafficType = trafficType; + } + + /** + * Sets event. + *

+ * The field is required. + * + * @param event + * @return This {@link RcsConversationStartedEvent instance}. + */ + public RcsConversationStartedEvent event(RcsConversationStartedEventContent event) { + this.event = event; + return this; + } + + /** + * Returns event. + *

+ * The field is required. + * + * @return event + */ + @JsonProperty("event") + public RcsConversationStartedEventContent getEvent() { + return event; + } + + /** + * Sets event. + *

+ * The field is required. + * + * @param event + */ + @JsonProperty("event") + public void setEvent(RcsConversationStartedEventContent event) { + this.event = event; + } + + /** + * Sets conversation. + *

+ * The field is required. + * + * @param conversation + * @return This {@link RcsConversationStartedEvent instance}. + */ + public RcsConversationStartedEvent conversation(RcsConversationStartedInfo conversation) { + this.conversation = conversation; + return this; + } + + /** + * Returns conversation. + *

+ * The field is required. + * + * @return conversation + */ + @JsonProperty("conversation") + public RcsConversationStartedInfo getConversation() { + return conversation; + } + + /** + * Sets conversation. + *

+ * The field is required. + * + * @param conversation + */ + @JsonProperty("conversation") + public void setConversation(RcsConversationStartedInfo conversation) { + this.conversation = conversation; + } + + /** + * Sets platform. + *

+ * The field is required. + * + * @param platform + * @return This {@link RcsConversationStartedEvent instance}. + */ + public RcsConversationStartedEvent platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + *

+ * The field is required. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + *

+ * The field is required. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RcsConversationStartedEvent rcsConversationStartedEvent = (RcsConversationStartedEvent) o; + return Objects.equals(this.messageId, rcsConversationStartedEvent.messageId) + && Objects.equals(this.trafficType, rcsConversationStartedEvent.trafficType) + && Objects.equals(this.event, rcsConversationStartedEvent.event) + && Objects.equals(this.conversation, rcsConversationStartedEvent.conversation) + && Objects.equals(this.platform, rcsConversationStartedEvent.platform); + } + + @Override + public int hashCode() { + return Objects.hash(messageId, trafficType, event, conversation, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class RcsConversationStartedEvent {") + .append(newLine) + .append(" messageId: ") + .append(toIndentedString(messageId)) + .append(newLine) + .append(" trafficType: ") + .append(toIndentedString(trafficType)) + .append(newLine) + .append(" event: ") + .append(toIndentedString(event)) + .append(newLine) + .append(" conversation: ") + .append(toIndentedString(conversation)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/RcsConversationStartedEventContent.java b/src/main/java/com/infobip/model/RcsConversationStartedEventContent.java new file mode 100644 index 0000000..086bcea --- /dev/null +++ b/src/main/java/com/infobip/model/RcsConversationStartedEventContent.java @@ -0,0 +1,97 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Conversation Started event details. + */ +public class RcsConversationStartedEventContent { + + private RcsConversationStartedEventType type; + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + * @return This {@link RcsConversationStartedEventContent instance}. + */ + public RcsConversationStartedEventContent type(RcsConversationStartedEventType type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public RcsConversationStartedEventType getType() { + return type; + } + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(RcsConversationStartedEventType type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RcsConversationStartedEventContent rcsConversationStartedEventContent = (RcsConversationStartedEventContent) o; + return Objects.equals(this.type, rcsConversationStartedEventContent.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class RcsConversationStartedEventContent {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/RcsConversationStartedEventType.java b/src/main/java/com/infobip/model/RcsConversationStartedEventType.java new file mode 100644 index 0000000..43d1996 --- /dev/null +++ b/src/main/java/com/infobip/model/RcsConversationStartedEventType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Conversation started event type. + */ +public enum RcsConversationStartedEventType { + STARTED("CONVERSATION_STARTED"), + STARTED2("CONVERSATION_STARTED"); + + private final String value; + + RcsConversationStartedEventType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RcsConversationStartedEventType fromValue(String value) { + for (RcsConversationStartedEventType enumElement : RcsConversationStartedEventType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/RcsConversationStartedEvents.java b/src/main/java/com/infobip/model/RcsConversationStartedEvents.java new file mode 100644 index 0000000..6f6277c --- /dev/null +++ b/src/main/java/com/infobip/model/RcsConversationStartedEvents.java @@ -0,0 +1,231 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents RcsConversationStartedEvents model. + */ +public class RcsConversationStartedEvents { + + private List results = new ArrayList<>(); + + private Integer eventCount; + + private Integer pendingEventCount; + + /** + * Sets results. + *

+ * Field description: + * Collection of conversation started events. + *

+ * The field is required. + * + * @param results + * @return This {@link RcsConversationStartedEvents instance}. + */ + public RcsConversationStartedEvents results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * Collection of conversation started events. + *

+ * The field is required. + * + * @param resultsItem The item to be added to the list. + * @return This {@link RcsConversationStartedEvents instance}. + */ + public RcsConversationStartedEvents addResultsItem(RcsConversationStartedEvent resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * Collection of conversation started events. + *

+ * The field is required. + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * Collection of conversation started events. + *

+ * The field is required. + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + /** + * Sets eventCount. + *

+ * Field description: + * The number of events returned in the results array. + *

+ * The field is required. + * + * @param eventCount + * @return This {@link RcsConversationStartedEvents instance}. + */ + public RcsConversationStartedEvents eventCount(Integer eventCount) { + this.eventCount = eventCount; + return this; + } + + /** + * Returns eventCount. + *

+ * Field description: + * The number of events returned in the results array. + *

+ * The field is required. + * + * @return eventCount + */ + @JsonProperty("eventCount") + public Integer getEventCount() { + return eventCount; + } + + /** + * Sets eventCount. + *

+ * Field description: + * The number of events returned in the results array. + *

+ * The field is required. + * + * @param eventCount + */ + @JsonProperty("eventCount") + public void setEventCount(Integer eventCount) { + this.eventCount = eventCount; + } + + /** + * Sets pendingEventCount. + *

+ * Field description: + * The number of events that have not been pulled in. + *

+ * The field is required. + * + * @param pendingEventCount + * @return This {@link RcsConversationStartedEvents instance}. + */ + public RcsConversationStartedEvents pendingEventCount(Integer pendingEventCount) { + this.pendingEventCount = pendingEventCount; + return this; + } + + /** + * Returns pendingEventCount. + *

+ * Field description: + * The number of events that have not been pulled in. + *

+ * The field is required. + * + * @return pendingEventCount + */ + @JsonProperty("pendingEventCount") + public Integer getPendingEventCount() { + return pendingEventCount; + } + + /** + * Sets pendingEventCount. + *

+ * Field description: + * The number of events that have not been pulled in. + *

+ * The field is required. + * + * @param pendingEventCount + */ + @JsonProperty("pendingEventCount") + public void setPendingEventCount(Integer pendingEventCount) { + this.pendingEventCount = pendingEventCount; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RcsConversationStartedEvents rcsConversationStartedEvents = (RcsConversationStartedEvents) o; + return Objects.equals(this.results, rcsConversationStartedEvents.results) + && Objects.equals(this.eventCount, rcsConversationStartedEvents.eventCount) + && Objects.equals(this.pendingEventCount, rcsConversationStartedEvents.pendingEventCount); + } + + @Override + public int hashCode() { + return Objects.hash(results, eventCount, pendingEventCount); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class RcsConversationStartedEvents {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append(" eventCount: ") + .append(toIndentedString(eventCount)) + .append(newLine) + .append(" pendingEventCount: ") + .append(toIndentedString(pendingEventCount)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/RcsConversationStartedInfo.java b/src/main/java/com/infobip/model/RcsConversationStartedInfo.java new file mode 100644 index 0000000..c120367 --- /dev/null +++ b/src/main/java/com/infobip/model/RcsConversationStartedInfo.java @@ -0,0 +1,254 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Conversation details including type, ID, and time window. + */ +public class RcsConversationStartedInfo { + + private RcsConversationType type; + + private String id; + + private OffsetDateTime startTime; + + private OffsetDateTime endTime; + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + * @return This {@link RcsConversationStartedInfo instance}. + */ + public RcsConversationStartedInfo type(RcsConversationType type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public RcsConversationType getType() { + return type; + } + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(RcsConversationType type) { + this.type = type; + } + + /** + * Sets id. + *

+ * Field description: + * Unique conversation identifier. + *

+ * The field is required. + * + * @param id + * @return This {@link RcsConversationStartedInfo instance}. + */ + public RcsConversationStartedInfo id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * Unique conversation identifier. + *

+ * The field is required. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * Unique conversation identifier. + *

+ * The field is required. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + /** + * Sets startTime. + *

+ * Field description: + * Conversation start time. + *

+ * The field is required. + * + * @param startTime + * @return This {@link RcsConversationStartedInfo instance}. + */ + public RcsConversationStartedInfo startTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Returns startTime. + *

+ * Field description: + * Conversation start time. + *

+ * The field is required. + * + * @return startTime + */ + @JsonProperty("startTime") + public OffsetDateTime getStartTime() { + return startTime; + } + + /** + * Sets startTime. + *

+ * Field description: + * Conversation start time. + *

+ * The field is required. + * + * @param startTime + */ + @JsonProperty("startTime") + public void setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + } + + /** + * Sets endTime. + *

+ * Field description: + * Conversation end time. + *

+ * The field is required. + * + * @param endTime + * @return This {@link RcsConversationStartedInfo instance}. + */ + public RcsConversationStartedInfo endTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Returns endTime. + *

+ * Field description: + * Conversation end time. + *

+ * The field is required. + * + * @return endTime + */ + @JsonProperty("endTime") + public OffsetDateTime getEndTime() { + return endTime; + } + + /** + * Sets endTime. + *

+ * Field description: + * Conversation end time. + *

+ * The field is required. + * + * @param endTime + */ + @JsonProperty("endTime") + public void setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RcsConversationStartedInfo rcsConversationStartedInfo = (RcsConversationStartedInfo) o; + return Objects.equals(this.type, rcsConversationStartedInfo.type) + && Objects.equals(this.id, rcsConversationStartedInfo.id) + && Objects.equals(this.startTime, rcsConversationStartedInfo.startTime) + && Objects.equals(this.endTime, rcsConversationStartedInfo.endTime); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, startTime, endTime); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class RcsConversationStartedInfo {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" startTime: ") + .append(toIndentedString(startTime)) + .append(newLine) + .append(" endTime: ") + .append(toIndentedString(endTime)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/RcsConversationType.java b/src/main/java/com/infobip/model/RcsConversationType.java new file mode 100644 index 0000000..24e2e04 --- /dev/null +++ b/src/main/java/com/infobip/model/RcsConversationType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Conversation type (Application to Person/Person to Application). + */ +public enum RcsConversationType { + A2P("A2P"), + P2A("P2A"); + + private final String value; + + RcsConversationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RcsConversationType fromValue(String value) { + for (RcsConversationType enumElement : RcsConversationType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/RcsEventInteractionType.java b/src/main/java/com/infobip/model/RcsEventInteractionType.java new file mode 100644 index 0000000..08ec996 --- /dev/null +++ b/src/main/java/com/infobip/model/RcsEventInteractionType.java @@ -0,0 +1,46 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The interaction type of the message that was sent. Note: this describes the message structure, not the billing category, which may differ. + */ +public enum RcsEventInteractionType { + EVENT("EVENT"); + + private final String value; + + RcsEventInteractionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RcsEventInteractionType fromValue(String value) { + for (RcsEventInteractionType enumElement : RcsEventInteractionType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/RcsInboundMessageEventContent.java b/src/main/java/com/infobip/model/RcsInboundEvent.java similarity index 64% rename from src/main/java/com/infobip/model/RcsInboundMessageEventContent.java rename to src/main/java/com/infobip/model/RcsInboundEvent.java index e10779b..983de5e 100644 --- a/src/main/java/com/infobip/model/RcsInboundMessageEventContent.java +++ b/src/main/java/com/infobip/model/RcsInboundEvent.java @@ -16,11 +16,9 @@ /** * Collection of mobile originated events. */ -public class RcsInboundMessageEventContent { +public class RcsInboundEvent { - private String entityId; - - private String applicationId; + private String campaignReferenceId; private String sender; @@ -30,6 +28,8 @@ public class RcsInboundMessageEventContent { private OffsetDateTime receivedAt; + private RcsEventInteractionType interactionType; + private String keyword; private String messageId; @@ -40,86 +40,50 @@ public class RcsInboundMessageEventContent { private RcsInboundMessageContent message; - private MessagePrice price; + private RcsMessagePrice price; - /** - * Sets entityId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @param entityId - * @return This {@link RcsInboundMessageEventContent instance}. - */ - public RcsInboundMessageEventContent entityId(String entityId) { - this.entityId = entityId; - return this; - } + private RcsConversationInfo conversation; - /** - * Returns entityId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @return entityId - */ - @JsonProperty("entityId") - public String getEntityId() { - return entityId; - } + private RcsPlatformInfo platform; /** - * Sets entityId. + * Sets campaignReferenceId. *

* Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * - * @param entityId + * @param campaignReferenceId + * @return This {@link RcsInboundEvent instance}. */ - @JsonProperty("entityId") - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - /** - * Sets applicationId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @param applicationId - * @return This {@link RcsInboundMessageEventContent instance}. - */ - public RcsInboundMessageEventContent applicationId(String applicationId) { - this.applicationId = applicationId; + public RcsInboundEvent campaignReferenceId(String campaignReferenceId) { + this.campaignReferenceId = campaignReferenceId; return this; } /** - * Returns applicationId. + * Returns campaignReferenceId. *

* Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * - * @return applicationId + * @return campaignReferenceId */ - @JsonProperty("applicationId") - public String getApplicationId() { - return applicationId; + @JsonProperty("campaignReferenceId") + public String getCampaignReferenceId() { + return campaignReferenceId; } /** - * Sets applicationId. + * Sets campaignReferenceId. *

* Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * - * @param applicationId + * @param campaignReferenceId */ - @JsonProperty("applicationId") - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; + @JsonProperty("campaignReferenceId") + public void setCampaignReferenceId(String campaignReferenceId) { + this.campaignReferenceId = campaignReferenceId; } /** @@ -131,9 +95,9 @@ public void setApplicationId(String applicationId) { * The field is required. * * @param sender - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent sender(String sender) { + public RcsInboundEvent sender(String sender) { this.sender = sender; return this; } @@ -177,9 +141,9 @@ public void setSender(String sender) { * The field is required. * * @param to - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent to(String to) { + public RcsInboundEvent to(String to) { this.to = to; return this; } @@ -223,9 +187,9 @@ public void setTo(String to) { * The field is required. * * @param integrationType - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent integrationType(String integrationType) { + public RcsInboundEvent integrationType(String integrationType) { this.integrationType = integrationType; return this; } @@ -269,9 +233,9 @@ public void setIntegrationType(String integrationType) { * The field is required. * * @param receivedAt - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent receivedAt(OffsetDateTime receivedAt) { + public RcsInboundEvent receivedAt(OffsetDateTime receivedAt) { this.receivedAt = receivedAt; return this; } @@ -306,6 +270,43 @@ public void setReceivedAt(OffsetDateTime receivedAt) { this.receivedAt = receivedAt; } + /** + * Sets interactionType. + *

+ * The field is required. + * + * @param interactionType + * @return This {@link RcsInboundEvent instance}. + */ + public RcsInboundEvent interactionType(RcsEventInteractionType interactionType) { + this.interactionType = interactionType; + return this; + } + + /** + * Returns interactionType. + *

+ * The field is required. + * + * @return interactionType + */ + @JsonProperty("interactionType") + public RcsEventInteractionType getInteractionType() { + return interactionType; + } + + /** + * Sets interactionType. + *

+ * The field is required. + * + * @param interactionType + */ + @JsonProperty("interactionType") + public void setInteractionType(RcsEventInteractionType interactionType) { + this.interactionType = interactionType; + } + /** * Sets keyword. *

@@ -313,9 +314,9 @@ public void setReceivedAt(OffsetDateTime receivedAt) { * Keyword extracted from the message text. * * @param keyword - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent keyword(String keyword) { + public RcsInboundEvent keyword(String keyword) { this.keyword = keyword; return this; } @@ -355,9 +356,9 @@ public void setKeyword(String keyword) { * The field is required. * * @param messageId - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent messageId(String messageId) { + public RcsInboundEvent messageId(String messageId) { this.messageId = messageId; return this; } @@ -399,9 +400,9 @@ public void setMessageId(String messageId) { * Message ID of paired outgoing message if matched by Infobip platform. * * @param pairedMessageId - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent pairedMessageId(String pairedMessageId) { + public RcsInboundEvent pairedMessageId(String pairedMessageId) { this.pairedMessageId = pairedMessageId; return this; } @@ -439,9 +440,9 @@ public void setPairedMessageId(String pairedMessageId) { * Callback data sent through ‛callbackData‛ field when sending message. * * @param callbackData - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent callbackData(String callbackData) { + public RcsInboundEvent callbackData(String callbackData) { this.callbackData = callbackData; return this; } @@ -478,9 +479,9 @@ public void setCallbackData(String callbackData) { * The field is required. * * @param message - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent message(RcsInboundMessageContent message) { + public RcsInboundEvent message(RcsInboundMessageContent message) { this.message = message; return this; } @@ -515,9 +516,9 @@ public void setMessage(RcsInboundMessageContent message) { * The field is required. * * @param price - * @return This {@link RcsInboundMessageEventContent instance}. + * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundMessageEventContent price(MessagePrice price) { + public RcsInboundEvent price(RcsMessagePrice price) { this.price = price; return this; } @@ -530,7 +531,7 @@ public RcsInboundMessageEventContent price(MessagePrice price) { * @return price */ @JsonProperty("price") - public MessagePrice getPrice() { + public RcsMessagePrice getPrice() { return price; } @@ -542,10 +543,84 @@ public MessagePrice getPrice() { * @param price */ @JsonProperty("price") - public void setPrice(MessagePrice price) { + public void setPrice(RcsMessagePrice price) { this.price = price; } + /** + * Sets conversation. + *

+ * The field is required. + * + * @param conversation + * @return This {@link RcsInboundEvent instance}. + */ + public RcsInboundEvent conversation(RcsConversationInfo conversation) { + this.conversation = conversation; + return this; + } + + /** + * Returns conversation. + *

+ * The field is required. + * + * @return conversation + */ + @JsonProperty("conversation") + public RcsConversationInfo getConversation() { + return conversation; + } + + /** + * Sets conversation. + *

+ * The field is required. + * + * @param conversation + */ + @JsonProperty("conversation") + public void setConversation(RcsConversationInfo conversation) { + this.conversation = conversation; + } + + /** + * Sets platform. + *

+ * The field is required. + * + * @param platform + * @return This {@link RcsInboundEvent instance}. + */ + public RcsInboundEvent platform(RcsPlatformInfo platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + *

+ * The field is required. + * + * @return platform + */ + @JsonProperty("platform") + public RcsPlatformInfo getPlatform() { + return platform; + } + + /** + * Sets platform. + *

+ * The field is required. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(RcsPlatformInfo platform) { + this.platform = platform; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -554,49 +629,50 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RcsInboundMessageEventContent rcsInboundMessageEventContent = (RcsInboundMessageEventContent) o; - return Objects.equals(this.entityId, rcsInboundMessageEventContent.entityId) - && Objects.equals(this.applicationId, rcsInboundMessageEventContent.applicationId) - && Objects.equals(this.sender, rcsInboundMessageEventContent.sender) - && Objects.equals(this.to, rcsInboundMessageEventContent.to) - && Objects.equals(this.integrationType, rcsInboundMessageEventContent.integrationType) - && Objects.equals(this.receivedAt, rcsInboundMessageEventContent.receivedAt) - && Objects.equals(this.keyword, rcsInboundMessageEventContent.keyword) - && Objects.equals(this.messageId, rcsInboundMessageEventContent.messageId) - && Objects.equals(this.pairedMessageId, rcsInboundMessageEventContent.pairedMessageId) - && Objects.equals(this.callbackData, rcsInboundMessageEventContent.callbackData) - && Objects.equals(this.message, rcsInboundMessageEventContent.message) - && Objects.equals(this.price, rcsInboundMessageEventContent.price); + RcsInboundEvent rcsInboundEvent = (RcsInboundEvent) o; + return Objects.equals(this.campaignReferenceId, rcsInboundEvent.campaignReferenceId) + && Objects.equals(this.sender, rcsInboundEvent.sender) + && Objects.equals(this.to, rcsInboundEvent.to) + && Objects.equals(this.integrationType, rcsInboundEvent.integrationType) + && Objects.equals(this.receivedAt, rcsInboundEvent.receivedAt) + && Objects.equals(this.interactionType, rcsInboundEvent.interactionType) + && Objects.equals(this.keyword, rcsInboundEvent.keyword) + && Objects.equals(this.messageId, rcsInboundEvent.messageId) + && Objects.equals(this.pairedMessageId, rcsInboundEvent.pairedMessageId) + && Objects.equals(this.callbackData, rcsInboundEvent.callbackData) + && Objects.equals(this.message, rcsInboundEvent.message) + && Objects.equals(this.price, rcsInboundEvent.price) + && Objects.equals(this.conversation, rcsInboundEvent.conversation) + && Objects.equals(this.platform, rcsInboundEvent.platform); } @Override public int hashCode() { return Objects.hash( - entityId, - applicationId, + campaignReferenceId, sender, to, integrationType, receivedAt, + interactionType, keyword, messageId, pairedMessageId, callbackData, message, - price); + price, + conversation, + platform); } @Override public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class RcsInboundMessageEventContent {") - .append(newLine) - .append(" entityId: ") - .append(toIndentedString(entityId)) + .append("class RcsInboundEvent {") .append(newLine) - .append(" applicationId: ") - .append(toIndentedString(applicationId)) + .append(" campaignReferenceId: ") + .append(toIndentedString(campaignReferenceId)) .append(newLine) .append(" sender: ") .append(toIndentedString(sender)) @@ -610,6 +686,9 @@ public String toString() { .append(" receivedAt: ") .append(toIndentedString(receivedAt)) .append(newLine) + .append(" interactionType: ") + .append(toIndentedString(interactionType)) + .append(newLine) .append(" keyword: ") .append(toIndentedString(keyword)) .append(newLine) @@ -628,6 +707,12 @@ public String toString() { .append(" price: ") .append(toIndentedString(price)) .append(newLine) + .append(" conversation: ") + .append(toIndentedString(conversation)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/RcsInboundEvents.java b/src/main/java/com/infobip/model/RcsInboundEvents.java index 75b719e..2375bd0 100644 --- a/src/main/java/com/infobip/model/RcsInboundEvents.java +++ b/src/main/java/com/infobip/model/RcsInboundEvents.java @@ -19,7 +19,7 @@ */ public class RcsInboundEvents { - private List results = new ArrayList<>(); + private List results = new ArrayList<>(); private Integer messageCount; @@ -36,7 +36,7 @@ public class RcsInboundEvents { * @param results * @return This {@link RcsInboundEvents instance}. */ - public RcsInboundEvents results(List results) { + public RcsInboundEvents results(List results) { this.results = results; return this; } @@ -52,7 +52,7 @@ public RcsInboundEvents results(List results) { * @param resultsItem The item to be added to the list. * @return This {@link RcsInboundEvents instance}. */ - public RcsInboundEvents addResultsItem(RcsInboundMessageEventContent resultsItem) { + public RcsInboundEvents addResultsItem(RcsInboundEvent resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -71,7 +71,7 @@ public RcsInboundEvents addResultsItem(RcsInboundMessageEventContent resultsItem * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -86,7 +86,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } diff --git a/src/main/java/com/infobip/model/RcsInboundMessageRcsInboundMessageContent.java b/src/main/java/com/infobip/model/RcsInboundMessage.java similarity index 61% rename from src/main/java/com/infobip/model/RcsInboundMessageRcsInboundMessageContent.java rename to src/main/java/com/infobip/model/RcsInboundMessage.java index 02e2e52..0af010f 100644 --- a/src/main/java/com/infobip/model/RcsInboundMessageRcsInboundMessageContent.java +++ b/src/main/java/com/infobip/model/RcsInboundMessage.java @@ -16,11 +16,9 @@ /** * Collection of mobile originated messages. */ -public class RcsInboundMessageRcsInboundMessageContent { +public class RcsInboundMessage { - private String entityId; - - private String applicationId; + private String campaignReferenceId; private String sender; @@ -30,6 +28,10 @@ public class RcsInboundMessageRcsInboundMessageContent { private OffsetDateTime receivedAt; + private RcsMessageInteractionType interactionType; + + private Integer rcsCount; + private String keyword; private String messageId; @@ -40,86 +42,50 @@ public class RcsInboundMessageRcsInboundMessageContent { private RcsInboundMessageContent message; - private MessagePrice price; + private RcsMessagePrice price; - /** - * Sets entityId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @param entityId - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. - */ - public RcsInboundMessageRcsInboundMessageContent entityId(String entityId) { - this.entityId = entityId; - return this; - } + private RcsConversationInfo conversation; - /** - * Returns entityId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @return entityId - */ - @JsonProperty("entityId") - public String getEntityId() { - return entityId; - } + private RcsPlatformInfo platform; /** - * Sets entityId. + * Sets campaignReferenceId. *

* Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * - * @param entityId + * @param campaignReferenceId + * @return This {@link RcsInboundMessage instance}. */ - @JsonProperty("entityId") - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - /** - * Sets applicationId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @param applicationId - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. - */ - public RcsInboundMessageRcsInboundMessageContent applicationId(String applicationId) { - this.applicationId = applicationId; + public RcsInboundMessage campaignReferenceId(String campaignReferenceId) { + this.campaignReferenceId = campaignReferenceId; return this; } /** - * Returns applicationId. + * Returns campaignReferenceId. *

* Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * - * @return applicationId + * @return campaignReferenceId */ - @JsonProperty("applicationId") - public String getApplicationId() { - return applicationId; + @JsonProperty("campaignReferenceId") + public String getCampaignReferenceId() { + return campaignReferenceId; } /** - * Sets applicationId. + * Sets campaignReferenceId. *

* Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * - * @param applicationId + * @param campaignReferenceId */ - @JsonProperty("applicationId") - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; + @JsonProperty("campaignReferenceId") + public void setCampaignReferenceId(String campaignReferenceId) { + this.campaignReferenceId = campaignReferenceId; } /** @@ -131,9 +97,9 @@ public void setApplicationId(String applicationId) { * The field is required. * * @param sender - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent sender(String sender) { + public RcsInboundMessage sender(String sender) { this.sender = sender; return this; } @@ -177,9 +143,9 @@ public void setSender(String sender) { * The field is required. * * @param to - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent to(String to) { + public RcsInboundMessage to(String to) { this.to = to; return this; } @@ -223,9 +189,9 @@ public void setTo(String to) { * The field is required. * * @param integrationType - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent integrationType(String integrationType) { + public RcsInboundMessage integrationType(String integrationType) { this.integrationType = integrationType; return this; } @@ -269,9 +235,9 @@ public void setIntegrationType(String integrationType) { * The field is required. * * @param receivedAt - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent receivedAt(OffsetDateTime receivedAt) { + public RcsInboundMessage receivedAt(OffsetDateTime receivedAt) { this.receivedAt = receivedAt; return this; } @@ -306,6 +272,89 @@ public void setReceivedAt(OffsetDateTime receivedAt) { this.receivedAt = receivedAt; } + /** + * Sets interactionType. + *

+ * The field is required. + * + * @param interactionType + * @return This {@link RcsInboundMessage instance}. + */ + public RcsInboundMessage interactionType(RcsMessageInteractionType interactionType) { + this.interactionType = interactionType; + return this; + } + + /** + * Returns interactionType. + *

+ * The field is required. + * + * @return interactionType + */ + @JsonProperty("interactionType") + public RcsMessageInteractionType getInteractionType() { + return interactionType; + } + + /** + * Sets interactionType. + *

+ * The field is required. + * + * @param interactionType + */ + @JsonProperty("interactionType") + public void setInteractionType(RcsMessageInteractionType interactionType) { + this.interactionType = interactionType; + } + + /** + * Sets rcsCount. + *

+ * Field description: + * A field that informs the client how many segment counts does a MO message contain. Can be received as > 1 for use case of Rich message in USA. + *

+ * The field is required. + * + * @param rcsCount + * @return This {@link RcsInboundMessage instance}. + */ + public RcsInboundMessage rcsCount(Integer rcsCount) { + this.rcsCount = rcsCount; + return this; + } + + /** + * Returns rcsCount. + *

+ * Field description: + * A field that informs the client how many segment counts does a MO message contain. Can be received as > 1 for use case of Rich message in USA. + *

+ * The field is required. + * + * @return rcsCount + */ + @JsonProperty("rcsCount") + public Integer getRcsCount() { + return rcsCount; + } + + /** + * Sets rcsCount. + *

+ * Field description: + * A field that informs the client how many segment counts does a MO message contain. Can be received as > 1 for use case of Rich message in USA. + *

+ * The field is required. + * + * @param rcsCount + */ + @JsonProperty("rcsCount") + public void setRcsCount(Integer rcsCount) { + this.rcsCount = rcsCount; + } + /** * Sets keyword. *

@@ -313,9 +362,9 @@ public void setReceivedAt(OffsetDateTime receivedAt) { * Keyword extracted from the message text. * * @param keyword - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent keyword(String keyword) { + public RcsInboundMessage keyword(String keyword) { this.keyword = keyword; return this; } @@ -355,9 +404,9 @@ public void setKeyword(String keyword) { * The field is required. * * @param messageId - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent messageId(String messageId) { + public RcsInboundMessage messageId(String messageId) { this.messageId = messageId; return this; } @@ -399,9 +448,9 @@ public void setMessageId(String messageId) { * Message ID of paired outgoing message if matched by Infobip platform. * * @param pairedMessageId - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent pairedMessageId(String pairedMessageId) { + public RcsInboundMessage pairedMessageId(String pairedMessageId) { this.pairedMessageId = pairedMessageId; return this; } @@ -439,9 +488,9 @@ public void setPairedMessageId(String pairedMessageId) { * Callback data sent through ‛callbackData‛ field when sending message. * * @param callbackData - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent callbackData(String callbackData) { + public RcsInboundMessage callbackData(String callbackData) { this.callbackData = callbackData; return this; } @@ -478,9 +527,9 @@ public void setCallbackData(String callbackData) { * The field is required. * * @param message - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent message(RcsInboundMessageContent message) { + public RcsInboundMessage message(RcsInboundMessageContent message) { this.message = message; return this; } @@ -515,9 +564,9 @@ public void setMessage(RcsInboundMessageContent message) { * The field is required. * * @param price - * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessageRcsInboundMessageContent price(MessagePrice price) { + public RcsInboundMessage price(RcsMessagePrice price) { this.price = price; return this; } @@ -530,7 +579,7 @@ public RcsInboundMessageRcsInboundMessageContent price(MessagePrice price) { * @return price */ @JsonProperty("price") - public MessagePrice getPrice() { + public RcsMessagePrice getPrice() { return price; } @@ -542,10 +591,84 @@ public MessagePrice getPrice() { * @param price */ @JsonProperty("price") - public void setPrice(MessagePrice price) { + public void setPrice(RcsMessagePrice price) { this.price = price; } + /** + * Sets conversation. + *

+ * The field is required. + * + * @param conversation + * @return This {@link RcsInboundMessage instance}. + */ + public RcsInboundMessage conversation(RcsConversationInfo conversation) { + this.conversation = conversation; + return this; + } + + /** + * Returns conversation. + *

+ * The field is required. + * + * @return conversation + */ + @JsonProperty("conversation") + public RcsConversationInfo getConversation() { + return conversation; + } + + /** + * Sets conversation. + *

+ * The field is required. + * + * @param conversation + */ + @JsonProperty("conversation") + public void setConversation(RcsConversationInfo conversation) { + this.conversation = conversation; + } + + /** + * Sets platform. + *

+ * The field is required. + * + * @param platform + * @return This {@link RcsInboundMessage instance}. + */ + public RcsInboundMessage platform(RcsPlatformInfo platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + *

+ * The field is required. + * + * @return platform + */ + @JsonProperty("platform") + public RcsPlatformInfo getPlatform() { + return platform; + } + + /** + * Sets platform. + *

+ * The field is required. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(RcsPlatformInfo platform) { + this.platform = platform; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -554,50 +677,52 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RcsInboundMessageRcsInboundMessageContent rcsInboundMessageRcsInboundMessageContent = - (RcsInboundMessageRcsInboundMessageContent) o; - return Objects.equals(this.entityId, rcsInboundMessageRcsInboundMessageContent.entityId) - && Objects.equals(this.applicationId, rcsInboundMessageRcsInboundMessageContent.applicationId) - && Objects.equals(this.sender, rcsInboundMessageRcsInboundMessageContent.sender) - && Objects.equals(this.to, rcsInboundMessageRcsInboundMessageContent.to) - && Objects.equals(this.integrationType, rcsInboundMessageRcsInboundMessageContent.integrationType) - && Objects.equals(this.receivedAt, rcsInboundMessageRcsInboundMessageContent.receivedAt) - && Objects.equals(this.keyword, rcsInboundMessageRcsInboundMessageContent.keyword) - && Objects.equals(this.messageId, rcsInboundMessageRcsInboundMessageContent.messageId) - && Objects.equals(this.pairedMessageId, rcsInboundMessageRcsInboundMessageContent.pairedMessageId) - && Objects.equals(this.callbackData, rcsInboundMessageRcsInboundMessageContent.callbackData) - && Objects.equals(this.message, rcsInboundMessageRcsInboundMessageContent.message) - && Objects.equals(this.price, rcsInboundMessageRcsInboundMessageContent.price); + RcsInboundMessage rcsInboundMessage = (RcsInboundMessage) o; + return Objects.equals(this.campaignReferenceId, rcsInboundMessage.campaignReferenceId) + && Objects.equals(this.sender, rcsInboundMessage.sender) + && Objects.equals(this.to, rcsInboundMessage.to) + && Objects.equals(this.integrationType, rcsInboundMessage.integrationType) + && Objects.equals(this.receivedAt, rcsInboundMessage.receivedAt) + && Objects.equals(this.interactionType, rcsInboundMessage.interactionType) + && Objects.equals(this.rcsCount, rcsInboundMessage.rcsCount) + && Objects.equals(this.keyword, rcsInboundMessage.keyword) + && Objects.equals(this.messageId, rcsInboundMessage.messageId) + && Objects.equals(this.pairedMessageId, rcsInboundMessage.pairedMessageId) + && Objects.equals(this.callbackData, rcsInboundMessage.callbackData) + && Objects.equals(this.message, rcsInboundMessage.message) + && Objects.equals(this.price, rcsInboundMessage.price) + && Objects.equals(this.conversation, rcsInboundMessage.conversation) + && Objects.equals(this.platform, rcsInboundMessage.platform); } @Override public int hashCode() { return Objects.hash( - entityId, - applicationId, + campaignReferenceId, sender, to, integrationType, receivedAt, + interactionType, + rcsCount, keyword, messageId, pairedMessageId, callbackData, message, - price); + price, + conversation, + platform); } @Override public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class RcsInboundMessageRcsInboundMessageContent {") + .append("class RcsInboundMessage {") .append(newLine) - .append(" entityId: ") - .append(toIndentedString(entityId)) - .append(newLine) - .append(" applicationId: ") - .append(toIndentedString(applicationId)) + .append(" campaignReferenceId: ") + .append(toIndentedString(campaignReferenceId)) .append(newLine) .append(" sender: ") .append(toIndentedString(sender)) @@ -611,6 +736,12 @@ public String toString() { .append(" receivedAt: ") .append(toIndentedString(receivedAt)) .append(newLine) + .append(" interactionType: ") + .append(toIndentedString(interactionType)) + .append(newLine) + .append(" rcsCount: ") + .append(toIndentedString(rcsCount)) + .append(newLine) .append(" keyword: ") .append(toIndentedString(keyword)) .append(newLine) @@ -629,6 +760,12 @@ public String toString() { .append(" price: ") .append(toIndentedString(price)) .append(newLine) + .append(" conversation: ") + .append(toIndentedString(conversation)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/RcsInboundMessages.java b/src/main/java/com/infobip/model/RcsInboundMessages.java index 75c88e5..2a5a416 100644 --- a/src/main/java/com/infobip/model/RcsInboundMessages.java +++ b/src/main/java/com/infobip/model/RcsInboundMessages.java @@ -19,7 +19,7 @@ */ public class RcsInboundMessages { - private List results = new ArrayList<>(); + private List results = new ArrayList<>(); private Integer messageCount; @@ -36,7 +36,7 @@ public class RcsInboundMessages { * @param results * @return This {@link RcsInboundMessages instance}. */ - public RcsInboundMessages results(List results) { + public RcsInboundMessages results(List results) { this.results = results; return this; } @@ -52,7 +52,7 @@ public RcsInboundMessages results(List(); } @@ -71,7 +71,7 @@ public RcsInboundMessages addResultsItem(RcsInboundMessageRcsInboundMessageConte * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -86,7 +86,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } diff --git a/src/main/java/com/infobip/model/RcsMessageInteractionType.java b/src/main/java/com/infobip/model/RcsMessageInteractionType.java new file mode 100644 index 0000000..cf867a4 --- /dev/null +++ b/src/main/java/com/infobip/model/RcsMessageInteractionType.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The interaction type of the message that was sent. Note: this describes the message structure, not the billing category, which may differ. + */ +public enum RcsMessageInteractionType { + BASIC_MESSAGE("BASIC_MESSAGE"), + SINGLE_MESSAGE("SINGLE_MESSAGE"), + RICH_MESSAGE("RICH_MESSAGE"), + RICH_MEDIA_MESSAGE("RICH_MEDIA_MESSAGE"); + + private final String value; + + RcsMessageInteractionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RcsMessageInteractionType fromValue(String value) { + for (RcsMessageInteractionType enumElement : RcsMessageInteractionType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/RcsMessagePrice.java b/src/main/java/com/infobip/model/RcsMessagePrice.java new file mode 100644 index 0000000..bf0bb9e --- /dev/null +++ b/src/main/java/com/infobip/model/RcsMessagePrice.java @@ -0,0 +1,183 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Price object with billing traffic type information. + */ +public class RcsMessagePrice { + + private RcsTrafficType trafficType; + + private Double pricePerMessage; + + private String currency; + + /** + * Sets trafficType. + * + * @param trafficType + * @return This {@link RcsMessagePrice instance}. + */ + public RcsMessagePrice trafficType(RcsTrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Returns trafficType. + * + * @return trafficType + */ + @JsonProperty("trafficType") + public RcsTrafficType getTrafficType() { + return trafficType; + } + + /** + * Sets trafficType. + * + * @param trafficType + */ + @JsonProperty("trafficType") + public void setTrafficType(RcsTrafficType trafficType) { + this.trafficType = trafficType; + } + + /** + * Sets pricePerMessage. + *

+ * Field description: + * Price per one message. + * + * @param pricePerMessage + * @return This {@link RcsMessagePrice instance}. + */ + public RcsMessagePrice pricePerMessage(Double pricePerMessage) { + this.pricePerMessage = pricePerMessage; + return this; + } + + /** + * Returns pricePerMessage. + *

+ * Field description: + * Price per one message. + * + * @return pricePerMessage + */ + @JsonProperty("pricePerMessage") + public Double getPricePerMessage() { + return pricePerMessage; + } + + /** + * Sets pricePerMessage. + *

+ * Field description: + * Price per one message. + * + * @param pricePerMessage + */ + @JsonProperty("pricePerMessage") + public void setPricePerMessage(Double pricePerMessage) { + this.pricePerMessage = pricePerMessage; + } + + /** + * Sets currency. + *

+ * Field description: + * The currency in which the price is expressed. + * + * @param currency + * @return This {@link RcsMessagePrice instance}. + */ + public RcsMessagePrice currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Returns currency. + *

+ * Field description: + * The currency in which the price is expressed. + * + * @return currency + */ + @JsonProperty("currency") + public String getCurrency() { + return currency; + } + + /** + * Sets currency. + *

+ * Field description: + * The currency in which the price is expressed. + * + * @param currency + */ + @JsonProperty("currency") + public void setCurrency(String currency) { + this.currency = currency; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RcsMessagePrice rcsMessagePrice = (RcsMessagePrice) o; + return Objects.equals(this.trafficType, rcsMessagePrice.trafficType) + && Objects.equals(this.pricePerMessage, rcsMessagePrice.pricePerMessage) + && Objects.equals(this.currency, rcsMessagePrice.currency); + } + + @Override + public int hashCode() { + return Objects.hash(trafficType, pricePerMessage, currency); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class RcsMessagePrice {") + .append(newLine) + .append(" trafficType: ") + .append(toIndentedString(trafficType)) + .append(newLine) + .append(" pricePerMessage: ") + .append(toIndentedString(pricePerMessage)) + .append(newLine) + .append(" currency: ") + .append(toIndentedString(currency)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/RcsPlatformInfo.java b/src/main/java/com/infobip/model/RcsPlatformInfo.java new file mode 100644 index 0000000..70e4e2f --- /dev/null +++ b/src/main/java/com/infobip/model/RcsPlatformInfo.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Platform information associated with the message. + */ +public class RcsPlatformInfo { + + private String applicationId; + + private String entityId; + + /** + * Sets applicationId. + *

+ * Field description: + * Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param applicationId + * @return This {@link RcsPlatformInfo instance}. + */ + public RcsPlatformInfo applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param entityId + * @return This {@link RcsPlatformInfo instance}. + */ + public RcsPlatformInfo entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RcsPlatformInfo rcsPlatformInfo = (RcsPlatformInfo) o; + return Objects.equals(this.applicationId, rcsPlatformInfo.applicationId) + && Objects.equals(this.entityId, rcsPlatformInfo.entityId); + } + + @Override + public int hashCode() { + return Objects.hash(applicationId, entityId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class RcsPlatformInfo {") + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/RcsTrafficType.java b/src/main/java/com/infobip/model/RcsTrafficType.java new file mode 100644 index 0000000..c6ce772 --- /dev/null +++ b/src/main/java/com/infobip/model/RcsTrafficType.java @@ -0,0 +1,51 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Billing traffic type applied to the message. Null for not chargeable messages. + */ +public enum RcsTrafficType { + BASIC("BASIC"), + SINGLE("SINGLE"), + RICH("RICH"), + RICH_MEDIA("RICH_MEDIA"), + A2P_CONVERSATION("A2P_CONVERSATION"), + P2A_CONVERSATION("P2A_CONVERSATION"); + + private final String value; + + RcsTrafficType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RcsTrafficType fromValue(String value) { + for (RcsTrafficType enumElement : RcsTrafficType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/RcsWebhookDeliveryReport.java b/src/main/java/com/infobip/model/RcsWebhookDeliveryReport.java index 3cb000d..67cc19c 100644 --- a/src/main/java/com/infobip/model/RcsWebhookDeliveryReport.java +++ b/src/main/java/com/infobip/model/RcsWebhookDeliveryReport.java @@ -59,28 +59,32 @@ public static ChannelEnum fromValue(String value) { private ChannelEnum channel; - private MessagePrice price; + private RcsMessagePrice price; private MessageStatus status; private MessageError error; - private String messageId; - - private String to; - - private String sender; + private RcsConversationInfo conversation; - private OffsetDateTime sentAt; + private String messageId; private OffsetDateTime doneAt; + private RcsMessageInteractionType interactionType; + private Integer messageCount; + private OffsetDateTime sentAt; + private String mccMnc; private String callbackData; + private String to; + + private String sender; + private Platform platform; private String campaignReferenceId; @@ -171,7 +175,7 @@ public void setChannel(ChannelEnum channel) { * @param price * @return This {@link RcsWebhookDeliveryReport instance}. */ - public RcsWebhookDeliveryReport price(MessagePrice price) { + public RcsWebhookDeliveryReport price(RcsMessagePrice price) { this.price = price; return this; } @@ -182,7 +186,7 @@ public RcsWebhookDeliveryReport price(MessagePrice price) { * @return price */ @JsonProperty("price") - public MessagePrice getPrice() { + public RcsMessagePrice getPrice() { return price; } @@ -192,7 +196,7 @@ public MessagePrice getPrice() { * @param price */ @JsonProperty("price") - public void setPrice(MessagePrice price) { + public void setPrice(RcsMessagePrice price) { this.price = price; } @@ -258,6 +262,37 @@ public void setError(MessageError error) { this.error = error; } + /** + * Sets conversation. + * + * @param conversation + * @return This {@link RcsWebhookDeliveryReport instance}. + */ + public RcsWebhookDeliveryReport conversation(RcsConversationInfo conversation) { + this.conversation = conversation; + return this; + } + + /** + * Returns conversation. + * + * @return conversation + */ + @JsonProperty("conversation") + public RcsConversationInfo getConversation() { + return conversation; + } + + /** + * Sets conversation. + * + * @param conversation + */ + @JsonProperty("conversation") + public void setConversation(RcsConversationInfo conversation) { + this.conversation = conversation; + } + /** * Sets messageId. *

@@ -299,83 +334,114 @@ public void setMessageId(String messageId) { } /** - * Sets to. + * Sets doneAt. *

* Field description: - * Message destination address. + * Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ. * - * @param to + * @param doneAt * @return This {@link RcsWebhookDeliveryReport instance}. */ - public RcsWebhookDeliveryReport to(String to) { - this.to = to; + public RcsWebhookDeliveryReport doneAt(OffsetDateTime doneAt) { + this.doneAt = doneAt; return this; } /** - * Returns to. + * Returns doneAt. *

* Field description: - * Message destination address. + * Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ. * - * @return to + * @return doneAt */ - @JsonProperty("to") - public String getTo() { - return to; + @JsonProperty("doneAt") + public OffsetDateTime getDoneAt() { + return doneAt; } /** - * Sets to. + * Sets doneAt. *

* Field description: - * Message destination address. + * Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ. * - * @param to + * @param doneAt */ - @JsonProperty("to") - public void setTo(String to) { - this.to = to; + @JsonProperty("doneAt") + public void setDoneAt(OffsetDateTime doneAt) { + this.doneAt = doneAt; } /** - * Sets sender. + * Sets interactionType. + * + * @param interactionType + * @return This {@link RcsWebhookDeliveryReport instance}. + */ + public RcsWebhookDeliveryReport interactionType(RcsMessageInteractionType interactionType) { + this.interactionType = interactionType; + return this; + } + + /** + * Returns interactionType. + * + * @return interactionType + */ + @JsonProperty("interactionType") + public RcsMessageInteractionType getInteractionType() { + return interactionType; + } + + /** + * Sets interactionType. + * + * @param interactionType + */ + @JsonProperty("interactionType") + public void setInteractionType(RcsMessageInteractionType interactionType) { + this.interactionType = interactionType; + } + + /** + * Sets messageCount. *

* Field description: - * The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). + * The number of sent messages. * - * @param sender + * @param messageCount * @return This {@link RcsWebhookDeliveryReport instance}. */ - public RcsWebhookDeliveryReport sender(String sender) { - this.sender = sender; + public RcsWebhookDeliveryReport messageCount(Integer messageCount) { + this.messageCount = messageCount; return this; } /** - * Returns sender. + * Returns messageCount. *

* Field description: - * The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). + * The number of sent messages. * - * @return sender + * @return messageCount */ - @JsonProperty("sender") - public String getSender() { - return sender; + @JsonProperty("messageCount") + public Integer getMessageCount() { + return messageCount; } /** - * Sets sender. + * Sets messageCount. *

* Field description: - * The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). + * The number of sent messages. * - * @param sender + * @param messageCount */ - @JsonProperty("sender") - public void setSender(String sender) { - this.sender = sender; + @JsonProperty("messageCount") + public void setMessageCount(Integer messageCount) { + this.messageCount = messageCount; } /** @@ -419,163 +485,163 @@ public void setSentAt(OffsetDateTime sentAt) { } /** - * Sets doneAt. + * Sets mccMnc. *

* Field description: - * Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ. + * Mobile country and network codes. * - * @param doneAt + * @param mccMnc * @return This {@link RcsWebhookDeliveryReport instance}. */ - public RcsWebhookDeliveryReport doneAt(OffsetDateTime doneAt) { - this.doneAt = doneAt; + public RcsWebhookDeliveryReport mccMnc(String mccMnc) { + this.mccMnc = mccMnc; return this; } /** - * Returns doneAt. + * Returns mccMnc. *

* Field description: - * Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ. + * Mobile country and network codes. * - * @return doneAt + * @return mccMnc */ - @JsonProperty("doneAt") - public OffsetDateTime getDoneAt() { - return doneAt; + @JsonProperty("mccMnc") + public String getMccMnc() { + return mccMnc; } /** - * Sets doneAt. + * Sets mccMnc. *

* Field description: - * Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ. + * Mobile country and network codes. * - * @param doneAt + * @param mccMnc */ - @JsonProperty("doneAt") - public void setDoneAt(OffsetDateTime doneAt) { - this.doneAt = doneAt; + @JsonProperty("mccMnc") + public void setMccMnc(String mccMnc) { + this.mccMnc = mccMnc; } /** - * Sets messageCount. + * Sets callbackData. *

* Field description: - * The number of sent messages. + * Callback data sent through ‛callbackData‛ field when sending message. * - * @param messageCount + * @param callbackData * @return This {@link RcsWebhookDeliveryReport instance}. */ - public RcsWebhookDeliveryReport messageCount(Integer messageCount) { - this.messageCount = messageCount; + public RcsWebhookDeliveryReport callbackData(String callbackData) { + this.callbackData = callbackData; return this; } /** - * Returns messageCount. + * Returns callbackData. *

* Field description: - * The number of sent messages. + * Callback data sent through ‛callbackData‛ field when sending message. * - * @return messageCount + * @return callbackData */ - @JsonProperty("messageCount") - public Integer getMessageCount() { - return messageCount; + @JsonProperty("callbackData") + public String getCallbackData() { + return callbackData; } /** - * Sets messageCount. + * Sets callbackData. *

* Field description: - * The number of sent messages. + * Callback data sent through ‛callbackData‛ field when sending message. * - * @param messageCount + * @param callbackData */ - @JsonProperty("messageCount") - public void setMessageCount(Integer messageCount) { - this.messageCount = messageCount; + @JsonProperty("callbackData") + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; } /** - * Sets mccMnc. + * Sets to. *

* Field description: - * Mobile country and network codes. + * Message destination address. * - * @param mccMnc + * @param to * @return This {@link RcsWebhookDeliveryReport instance}. */ - public RcsWebhookDeliveryReport mccMnc(String mccMnc) { - this.mccMnc = mccMnc; + public RcsWebhookDeliveryReport to(String to) { + this.to = to; return this; } /** - * Returns mccMnc. + * Returns to. *

* Field description: - * Mobile country and network codes. + * Message destination address. * - * @return mccMnc + * @return to */ - @JsonProperty("mccMnc") - public String getMccMnc() { - return mccMnc; + @JsonProperty("to") + public String getTo() { + return to; } /** - * Sets mccMnc. + * Sets to. *

* Field description: - * Mobile country and network codes. + * Message destination address. * - * @param mccMnc + * @param to */ - @JsonProperty("mccMnc") - public void setMccMnc(String mccMnc) { - this.mccMnc = mccMnc; + @JsonProperty("to") + public void setTo(String to) { + this.to = to; } /** - * Sets callbackData. + * Sets sender. *

* Field description: - * Callback data sent through ‛callbackData‛ field when sending message. + * The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). * - * @param callbackData + * @param sender * @return This {@link RcsWebhookDeliveryReport instance}. */ - public RcsWebhookDeliveryReport callbackData(String callbackData) { - this.callbackData = callbackData; + public RcsWebhookDeliveryReport sender(String sender) { + this.sender = sender; return this; } /** - * Returns callbackData. + * Returns sender. *

* Field description: - * Callback data sent through ‛callbackData‛ field when sending message. + * The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). * - * @return callbackData + * @return sender */ - @JsonProperty("callbackData") - public String getCallbackData() { - return callbackData; + @JsonProperty("sender") + public String getSender() { + return sender; } /** - * Sets callbackData. + * Sets sender. *

* Field description: - * Callback data sent through ‛callbackData‛ field when sending message. + * The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). * - * @param callbackData + * @param sender */ - @JsonProperty("callbackData") - public void setCallbackData(String callbackData) { - this.callbackData = callbackData; + @JsonProperty("sender") + public void setSender(String sender) { + this.sender = sender; } /** @@ -663,14 +729,16 @@ public boolean equals(Object o) { && Objects.equals(this.price, rcsWebhookDeliveryReport.price) && Objects.equals(this.status, rcsWebhookDeliveryReport.status) && Objects.equals(this.error, rcsWebhookDeliveryReport.error) + && Objects.equals(this.conversation, rcsWebhookDeliveryReport.conversation) && Objects.equals(this.messageId, rcsWebhookDeliveryReport.messageId) - && Objects.equals(this.to, rcsWebhookDeliveryReport.to) - && Objects.equals(this.sender, rcsWebhookDeliveryReport.sender) - && Objects.equals(this.sentAt, rcsWebhookDeliveryReport.sentAt) && Objects.equals(this.doneAt, rcsWebhookDeliveryReport.doneAt) + && Objects.equals(this.interactionType, rcsWebhookDeliveryReport.interactionType) && Objects.equals(this.messageCount, rcsWebhookDeliveryReport.messageCount) + && Objects.equals(this.sentAt, rcsWebhookDeliveryReport.sentAt) && Objects.equals(this.mccMnc, rcsWebhookDeliveryReport.mccMnc) && Objects.equals(this.callbackData, rcsWebhookDeliveryReport.callbackData) + && Objects.equals(this.to, rcsWebhookDeliveryReport.to) + && Objects.equals(this.sender, rcsWebhookDeliveryReport.sender) && Objects.equals(this.platform, rcsWebhookDeliveryReport.platform) && Objects.equals(this.campaignReferenceId, rcsWebhookDeliveryReport.campaignReferenceId); } @@ -683,14 +751,16 @@ public int hashCode() { price, status, error, + conversation, messageId, - to, - sender, - sentAt, doneAt, + interactionType, messageCount, + sentAt, mccMnc, callbackData, + to, + sender, platform, campaignReferenceId); } @@ -716,30 +786,36 @@ public String toString() { .append(" error: ") .append(toIndentedString(error)) .append(newLine) + .append(" conversation: ") + .append(toIndentedString(conversation)) + .append(newLine) .append(" messageId: ") .append(toIndentedString(messageId)) .append(newLine) - .append(" to: ") - .append(toIndentedString(to)) - .append(newLine) - .append(" sender: ") - .append(toIndentedString(sender)) - .append(newLine) - .append(" sentAt: ") - .append(toIndentedString(sentAt)) - .append(newLine) .append(" doneAt: ") .append(toIndentedString(doneAt)) .append(newLine) + .append(" interactionType: ") + .append(toIndentedString(interactionType)) + .append(newLine) .append(" messageCount: ") .append(toIndentedString(messageCount)) .append(newLine) + .append(" sentAt: ") + .append(toIndentedString(sentAt)) + .append(newLine) .append(" mccMnc: ") .append(toIndentedString(mccMnc)) .append(newLine) .append(" callbackData: ") .append(toIndentedString(callbackData)) .append(newLine) + .append(" to: ") + .append(toIndentedString(to)) + .append(newLine) + .append(" sender: ") + .append(toIndentedString(sender)) + .append(newLine) .append(" platform: ") .append(toIndentedString(platform)) .append(newLine) diff --git a/src/main/java/com/infobip/model/ResourcesAlphaCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesAlphaCoverageInfo.java new file mode 100644 index 0000000..b7ba4ac --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAlphaCoverageInfo.java @@ -0,0 +1,288 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the sender coverage. + */ +public class ResourcesAlphaCoverageInfo implements ResourcesIbResourceCoverageInfo { + + private String senderName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @param senderName + * @return This {@link ResourcesAlphaCoverageInfo instance}. + */ + public ResourcesAlphaCoverageInfo senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesAlphaCoverageInfo instance}. + */ + public ResourcesAlphaCoverageInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesAlphaCoverageInfo instance}. + */ + public ResourcesAlphaCoverageInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + * + * @param capabilities + * @return This {@link ResourcesAlphaCoverageInfo instance}. + */ + public ResourcesAlphaCoverageInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesAlphaCoverageInfo instance}. + */ + public ResourcesAlphaCoverageInfo addCapabilitiesItem(ResourcesIbResourceCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesAlphaCoverageInfo instance}. + */ + public ResourcesAlphaCoverageInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAlphaCoverageInfo resourcesAlphaCoverageInfo = (ResourcesAlphaCoverageInfo) o; + return Objects.equals(this.senderName, resourcesAlphaCoverageInfo.senderName) + && Objects.equals(this.countryCode, resourcesAlphaCoverageInfo.countryCode) + && Objects.equals(this.countryName, resourcesAlphaCoverageInfo.countryName) + && Objects.equals(this.capabilities, resourcesAlphaCoverageInfo.capabilities) + && Objects.equals(this.resourceType, resourcesAlphaCoverageInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(senderName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAlphaCoverageInfo {") + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAlphaCoverageKey.java b/src/main/java/com/infobip/model/ResourcesAlphaCoverageKey.java new file mode 100644 index 0000000..0d4055c --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAlphaCoverageKey.java @@ -0,0 +1,169 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesAlphaCoverageKey model. + */ +public class ResourcesAlphaCoverageKey extends ResourcesIbResourceCoverageKey { + + private String senderName; + + private String countryCode; + + /** + * Constructs a new {@link ResourcesAlphaCoverageKey} instance. + */ + public ResourcesAlphaCoverageKey() { + super("ALPHANUMERIC"); + } + + /** + * Sets senderName. + *

+ * Field description: + * Alphanumeric sender name. + *

+ * The field is required. + * + * @param senderName + * @return This {@link ResourcesAlphaCoverageKey instance}. + */ + public ResourcesAlphaCoverageKey senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Alphanumeric sender name. + *

+ * The field is required. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Alphanumeric sender name. + *

+ * The field is required. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesAlphaCoverageKey instance}. + */ + public ResourcesAlphaCoverageKey countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAlphaCoverageKey resourcesAlphaCoverageKey = (ResourcesAlphaCoverageKey) o; + return Objects.equals(this.senderName, resourcesAlphaCoverageKey.senderName) + && Objects.equals(this.countryCode, resourcesAlphaCoverageKey.countryCode) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(senderName, countryCode, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAlphaCoverageKey {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAlphaRequirementSpecsRequestApiDoc.java b/src/main/java/com/infobip/model/ResourcesAlphaRequirementSpecsRequestApiDoc.java new file mode 100644 index 0000000..cdad78d --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAlphaRequirementSpecsRequestApiDoc.java @@ -0,0 +1,267 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; + +/** + * Represents ResourcesAlphaRequirementSpecsRequestApiDoc model. + */ +public class ResourcesAlphaRequirementSpecsRequestApiDoc implements ResourcesRequirementsLookupBody { + /** + * Type of resource. + */ + public enum TypeEnum { + ALPHANUMERIC_REGISTRATION("ALPHANUMERIC_REGISTRATION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private String countryCode; + + private ResourcesTrafficOrigin trafficOrigin; + + private ResourcesTrafficType trafficType; + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + * @return This {@link ResourcesAlphaRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesAlphaRequirementSpecsRequestApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesAlphaRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesAlphaRequirementSpecsRequestApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets trafficOrigin. + * + * @param trafficOrigin + * @return This {@link ResourcesAlphaRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesAlphaRequirementSpecsRequestApiDoc trafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + return this; + } + + /** + * Returns trafficOrigin. + * + * @return trafficOrigin + */ + @JsonProperty("trafficOrigin") + public ResourcesTrafficOrigin getTrafficOrigin() { + return trafficOrigin; + } + + /** + * Sets trafficOrigin. + * + * @param trafficOrigin + */ + @JsonProperty("trafficOrigin") + public void setTrafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + } + + /** + * Sets trafficType. + * + * @param trafficType + * @return This {@link ResourcesAlphaRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesAlphaRequirementSpecsRequestApiDoc trafficType(ResourcesTrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Returns trafficType. + * + * @return trafficType + */ + @JsonProperty("trafficType") + public ResourcesTrafficType getTrafficType() { + return trafficType; + } + + /** + * Sets trafficType. + * + * @param trafficType + */ + @JsonProperty("trafficType") + public void setTrafficType(ResourcesTrafficType trafficType) { + this.trafficType = trafficType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAlphaRequirementSpecsRequestApiDoc resourcesAlphaRequirementSpecsRequestApiDoc = + (ResourcesAlphaRequirementSpecsRequestApiDoc) o; + return Objects.equals(this.type, resourcesAlphaRequirementSpecsRequestApiDoc.type) + && Objects.equals(this.countryCode, resourcesAlphaRequirementSpecsRequestApiDoc.countryCode) + && Objects.equals(this.trafficOrigin, resourcesAlphaRequirementSpecsRequestApiDoc.trafficOrigin) + && Objects.equals(this.trafficType, resourcesAlphaRequirementSpecsRequestApiDoc.trafficType); + } + + @Override + public int hashCode() { + return Objects.hash(type, countryCode, trafficOrigin, trafficType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAlphaRequirementSpecsRequestApiDoc {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" trafficOrigin: ") + .append(toIndentedString(trafficOrigin)) + .append(newLine) + .append(" trafficType: ") + .append(toIndentedString(trafficType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAlphaResourceFilter.java b/src/main/java/com/infobip/model/ResourcesAlphaResourceFilter.java new file mode 100644 index 0000000..a5fb153 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAlphaResourceFilter.java @@ -0,0 +1,157 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Alphanumeric filter for resources. + */ +public class ResourcesAlphaResourceFilter extends ResourcesIbResourcesFilter { + + private String senderName; + + private String countryCode; + + /** + * Constructs a new {@link ResourcesAlphaResourceFilter} instance. + */ + public ResourcesAlphaResourceFilter() { + super("ALPHANUMERIC"); + } + + /** + * Sets senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @param senderName + * @return This {@link ResourcesAlphaResourceFilter instance}. + */ + public ResourcesAlphaResourceFilter senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesAlphaResourceFilter instance}. + */ + public ResourcesAlphaResourceFilter countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAlphaResourceFilter resourcesAlphaResourceFilter = (ResourcesAlphaResourceFilter) o; + return Objects.equals(this.senderName, resourcesAlphaResourceFilter.senderName) + && Objects.equals(this.countryCode, resourcesAlphaResourceFilter.countryCode) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(senderName, countryCode, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAlphaResourceFilter {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAlphaResourceInfo.java b/src/main/java/com/infobip/model/ResourcesAlphaResourceInfo.java new file mode 100644 index 0000000..6e813fb --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAlphaResourceInfo.java @@ -0,0 +1,294 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about alphanumeric type of resource. + */ +public class ResourcesAlphaResourceInfo implements ResourcesIbResourceInfo { + + private String senderName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @param senderName + * @return This {@link ResourcesAlphaResourceInfo instance}. + */ + public ResourcesAlphaResourceInfo senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Alphanumeric sender name. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesAlphaResourceInfo instance}. + */ + public ResourcesAlphaResourceInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesAlphaResourceInfo instance}. + */ + public ResourcesAlphaResourceInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + * @return This {@link ResourcesAlphaResourceInfo instance}. + */ + public ResourcesAlphaResourceInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesAlphaResourceInfo instance}. + */ + public ResourcesAlphaResourceInfo addCapabilitiesItem(ResourcesResourceCapabilityChannel capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesAlphaResourceInfo instance}. + */ + public ResourcesAlphaResourceInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAlphaResourceInfo resourcesAlphaResourceInfo = (ResourcesAlphaResourceInfo) o; + return Objects.equals(this.senderName, resourcesAlphaResourceInfo.senderName) + && Objects.equals(this.countryCode, resourcesAlphaResourceInfo.countryCode) + && Objects.equals(this.countryName, resourcesAlphaResourceInfo.countryName) + && Objects.equals(this.capabilities, resourcesAlphaResourceInfo.capabilities) + && Objects.equals(this.resourceType, resourcesAlphaResourceInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(senderName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAlphaResourceInfo {") + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderApiDoc.java b/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderApiDoc.java new file mode 100644 index 0000000..83d9314 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderApiDoc.java @@ -0,0 +1,774 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents ResourcesAlphaResourceOrderApiDoc model. + */ +public class ResourcesAlphaResourceOrderApiDoc + implements GetResourceRequest200Response, ResourcesPageResourceOrderApiDocResultsInner { + + private UUID id; + + /** + * Type of resource. + */ + public enum TypeEnum { + ALPHANUMERIC_REGISTRATION("ALPHANUMERIC_REGISTRATION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private String countryCode; + + private String senderName; + + private String requestedByEmailAddress; + + private List additionalContactEmailAddresses = null; + + private OffsetDateTime requestedDate; + + private ResourcesResourceOrderStatus status; + + private ResourcesTrafficOrigin trafficOrigin; + + private ResourcesTrafficType trafficType; + + private String note; + + private List requirementsFeedback = null; + + private List requirements = null; + + private Platform platform; + + /** + * Sets id. + *

+ * Field description: + * The ID of the resource. + * + * @param id + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc id(UUID id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The ID of the resource. + * + * @return id + */ + @JsonProperty("id") + public UUID getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The ID of the resource. + * + * @param id + */ + @JsonProperty("id") + public void setId(UUID id) { + this.id = id; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + * + * @param type + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @param countryCode + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Sender name. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @param requestedByEmailAddress + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc requestedByEmailAddress(String requestedByEmailAddress) { + this.requestedByEmailAddress = requestedByEmailAddress; + return this; + } + + /** + * Returns requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @return requestedByEmailAddress + */ + @JsonProperty("requestedByEmailAddress") + public String getRequestedByEmailAddress() { + return requestedByEmailAddress; + } + + /** + * Sets requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @param requestedByEmailAddress + */ + @JsonProperty("requestedByEmailAddress") + public void setRequestedByEmailAddress(String requestedByEmailAddress) { + this.requestedByEmailAddress = requestedByEmailAddress; + } + + /** + * Sets additionalContactEmailAddresses. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmailAddresses + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc additionalContactEmailAddresses( + List additionalContactEmailAddresses) { + this.additionalContactEmailAddresses = additionalContactEmailAddresses; + return this; + } + + /** + * Adds and item into additionalContactEmailAddresses. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmailAddressesItem The item to be added to the list. + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc addAdditionalContactEmailAddressesItem( + String additionalContactEmailAddressesItem) { + if (this.additionalContactEmailAddresses == null) { + this.additionalContactEmailAddresses = new ArrayList<>(); + } + this.additionalContactEmailAddresses.add(additionalContactEmailAddressesItem); + return this; + } + + /** + * Returns additionalContactEmailAddresses. + *

+ * Field description: + * Additional email addresses. + * + * @return additionalContactEmailAddresses + */ + @JsonProperty("additionalContactEmailAddresses") + public List getAdditionalContactEmailAddresses() { + return additionalContactEmailAddresses; + } + + /** + * Sets additionalContactEmailAddresses. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmailAddresses + */ + @JsonProperty("additionalContactEmailAddresses") + public void setAdditionalContactEmailAddresses(List additionalContactEmailAddresses) { + this.additionalContactEmailAddresses = additionalContactEmailAddresses; + } + + /** + * Sets requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @param requestedDate + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc requestedDate(OffsetDateTime requestedDate) { + this.requestedDate = requestedDate; + return this; + } + + /** + * Returns requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @return requestedDate + */ + @JsonProperty("requestedDate") + public OffsetDateTime getRequestedDate() { + return requestedDate; + } + + /** + * Sets requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @param requestedDate + */ + @JsonProperty("requestedDate") + public void setRequestedDate(OffsetDateTime requestedDate) { + this.requestedDate = requestedDate; + } + + /** + * Sets status. + * + * @param status + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc status(ResourcesResourceOrderStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + * + * @return status + */ + @JsonProperty("status") + public ResourcesResourceOrderStatus getStatus() { + return status; + } + + /** + * Sets status. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(ResourcesResourceOrderStatus status) { + this.status = status; + } + + /** + * Sets trafficOrigin. + * + * @param trafficOrigin + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc trafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + return this; + } + + /** + * Returns trafficOrigin. + * + * @return trafficOrigin + */ + @JsonProperty("trafficOrigin") + public ResourcesTrafficOrigin getTrafficOrigin() { + return trafficOrigin; + } + + /** + * Sets trafficOrigin. + * + * @param trafficOrigin + */ + @JsonProperty("trafficOrigin") + public void setTrafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + } + + /** + * Sets trafficType. + * + * @param trafficType + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc trafficType(ResourcesTrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Returns trafficType. + * + * @return trafficType + */ + @JsonProperty("trafficType") + public ResourcesTrafficType getTrafficType() { + return trafficType; + } + + /** + * Sets trafficType. + * + * @param trafficType + */ + @JsonProperty("trafficType") + public void setTrafficType(ResourcesTrafficType trafficType) { + this.trafficType = trafficType; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc note(String note) { + this.note = note; + return this; + } + + /** + * Returns note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @return note + */ + @JsonProperty("note") + public String getNote() { + return note; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + */ + @JsonProperty("note") + public void setNote(String note) { + this.note = note; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedback + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc requirementsFeedback( + List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + return this; + } + + /** + * Adds and item into requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedbackItem The item to be added to the list. + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc addRequirementsFeedbackItem( + ResourcesFilledRequirementFeedback requirementsFeedbackItem) { + if (this.requirementsFeedback == null) { + this.requirementsFeedback = new ArrayList<>(); + } + this.requirementsFeedback.add(requirementsFeedbackItem); + return this; + } + + /** + * Returns requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @return requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public List getRequirementsFeedback() { + return requirementsFeedback; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public void setRequirementsFeedback(List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirements + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc requirements(List requirements) { + this.requirements = requirements; + return this; + } + + /** + * Adds and item into requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirementsItem The item to be added to the list. + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc addRequirementsItem(ResourcesFilledRequirement requirementsItem) { + if (this.requirements == null) { + this.requirements = new ArrayList<>(); + } + this.requirements.add(requirementsItem); + return this; + } + + /** + * Returns requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @return requirements + */ + @JsonProperty("requirements") + public List getRequirements() { + return requirements; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirements + */ + @JsonProperty("requirements") + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesAlphaResourceOrderApiDoc instance}. + */ + public ResourcesAlphaResourceOrderApiDoc platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAlphaResourceOrderApiDoc resourcesAlphaResourceOrderApiDoc = (ResourcesAlphaResourceOrderApiDoc) o; + return Objects.equals(this.id, resourcesAlphaResourceOrderApiDoc.id) + && Objects.equals(this.type, resourcesAlphaResourceOrderApiDoc.type) + && Objects.equals(this.countryCode, resourcesAlphaResourceOrderApiDoc.countryCode) + && Objects.equals(this.senderName, resourcesAlphaResourceOrderApiDoc.senderName) + && Objects.equals( + this.requestedByEmailAddress, resourcesAlphaResourceOrderApiDoc.requestedByEmailAddress) + && Objects.equals( + this.additionalContactEmailAddresses, + resourcesAlphaResourceOrderApiDoc.additionalContactEmailAddresses) + && Objects.equals(this.requestedDate, resourcesAlphaResourceOrderApiDoc.requestedDate) + && Objects.equals(this.status, resourcesAlphaResourceOrderApiDoc.status) + && Objects.equals(this.trafficOrigin, resourcesAlphaResourceOrderApiDoc.trafficOrigin) + && Objects.equals(this.trafficType, resourcesAlphaResourceOrderApiDoc.trafficType) + && Objects.equals(this.note, resourcesAlphaResourceOrderApiDoc.note) + && Objects.equals(this.requirementsFeedback, resourcesAlphaResourceOrderApiDoc.requirementsFeedback) + && Objects.equals(this.requirements, resourcesAlphaResourceOrderApiDoc.requirements) + && Objects.equals(this.platform, resourcesAlphaResourceOrderApiDoc.platform); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + type, + countryCode, + senderName, + requestedByEmailAddress, + additionalContactEmailAddresses, + requestedDate, + status, + trafficOrigin, + trafficType, + note, + requirementsFeedback, + requirements, + platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAlphaResourceOrderApiDoc {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" requestedByEmailAddress: ") + .append(toIndentedString(requestedByEmailAddress)) + .append(newLine) + .append(" additionalContactEmailAddresses: ") + .append(toIndentedString(additionalContactEmailAddresses)) + .append(newLine) + .append(" requestedDate: ") + .append(toIndentedString(requestedDate)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" trafficOrigin: ") + .append(toIndentedString(trafficOrigin)) + .append(newLine) + .append(" trafficType: ") + .append(toIndentedString(trafficType)) + .append(newLine) + .append(" note: ") + .append(toIndentedString(note)) + .append(newLine) + .append(" requirementsFeedback: ") + .append(toIndentedString(requirementsFeedback)) + .append(newLine) + .append(" requirements: ") + .append(toIndentedString(requirements)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderRequestApiDoc.java b/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderRequestApiDoc.java new file mode 100644 index 0000000..f33e887 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderRequestApiDoc.java @@ -0,0 +1,501 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesAlphaResourceOrderRequestApiDoc model. + */ +public class ResourcesAlphaResourceOrderRequestApiDoc implements ResourcesSubmitResourceRequestBody { + /** + * Type of resource. + */ + public enum TypeEnum { + ALPHANUMERIC_REGISTRATION("ALPHANUMERIC_REGISTRATION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private String senderName; + + private List additionalContactEmails = null; + + private String countryCode; + + private ResourcesTrafficOrigin trafficOrigin; + + private ResourcesTrafficType trafficType; + + private List requirements = new ArrayList<>(); + + private Platform platform; + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. GSM7 format required, with at least one letter. + *

+ * The field is required. + * + * @param senderName + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Sender name. GSM7 format required, with at least one letter. + *

+ * The field is required. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. GSM7 format required, with at least one letter. + *

+ * The field is required. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmails + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc additionalContactEmails(List additionalContactEmails) { + this.additionalContactEmails = additionalContactEmails; + return this; + } + + /** + * Adds and item into additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmailsItem The item to be added to the list. + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc addAdditionalContactEmailsItem(String additionalContactEmailsItem) { + if (this.additionalContactEmails == null) { + this.additionalContactEmails = new ArrayList<>(); + } + this.additionalContactEmails.add(additionalContactEmailsItem); + return this; + } + + /** + * Returns additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @return additionalContactEmails + */ + @JsonProperty("additionalContactEmails") + public List getAdditionalContactEmails() { + return additionalContactEmails; + } + + /** + * Sets additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmails + */ + @JsonProperty("additionalContactEmails") + public void setAdditionalContactEmails(List additionalContactEmails) { + this.additionalContactEmails = additionalContactEmails; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets trafficOrigin. + * + * @param trafficOrigin + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc trafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + return this; + } + + /** + * Returns trafficOrigin. + * + * @return trafficOrigin + */ + @JsonProperty("trafficOrigin") + public ResourcesTrafficOrigin getTrafficOrigin() { + return trafficOrigin; + } + + /** + * Sets trafficOrigin. + * + * @param trafficOrigin + */ + @JsonProperty("trafficOrigin") + public void setTrafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + } + + /** + * Sets trafficType. + * + * @param trafficType + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc trafficType(ResourcesTrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Returns trafficType. + * + * @return trafficType + */ + @JsonProperty("trafficType") + public ResourcesTrafficType getTrafficType() { + return trafficType; + } + + /** + * Sets trafficType. + * + * @param trafficType + */ + @JsonProperty("trafficType") + public void setTrafficType(ResourcesTrafficType trafficType) { + this.trafficType = trafficType; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirements + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc requirements(List requirements) { + this.requirements = requirements; + return this; + } + + /** + * Adds and item into requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirementsItem The item to be added to the list. + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc addRequirementsItem(ResourcesFilledRequirement requirementsItem) { + if (this.requirements == null) { + this.requirements = new ArrayList<>(); + } + this.requirements.add(requirementsItem); + return this; + } + + /** + * Returns requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @return requirements + */ + @JsonProperty("requirements") + public List getRequirements() { + return requirements; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirements + */ + @JsonProperty("requirements") + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesAlphaResourceOrderRequestApiDoc instance}. + */ + public ResourcesAlphaResourceOrderRequestApiDoc platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAlphaResourceOrderRequestApiDoc resourcesAlphaResourceOrderRequestApiDoc = + (ResourcesAlphaResourceOrderRequestApiDoc) o; + return Objects.equals(this.type, resourcesAlphaResourceOrderRequestApiDoc.type) + && Objects.equals(this.senderName, resourcesAlphaResourceOrderRequestApiDoc.senderName) + && Objects.equals( + this.additionalContactEmails, resourcesAlphaResourceOrderRequestApiDoc.additionalContactEmails) + && Objects.equals(this.countryCode, resourcesAlphaResourceOrderRequestApiDoc.countryCode) + && Objects.equals(this.trafficOrigin, resourcesAlphaResourceOrderRequestApiDoc.trafficOrigin) + && Objects.equals(this.trafficType, resourcesAlphaResourceOrderRequestApiDoc.trafficType) + && Objects.equals(this.requirements, resourcesAlphaResourceOrderRequestApiDoc.requirements) + && Objects.equals(this.platform, resourcesAlphaResourceOrderRequestApiDoc.platform); + } + + @Override + public int hashCode() { + return Objects.hash( + type, + senderName, + additionalContactEmails, + countryCode, + trafficOrigin, + trafficType, + requirements, + platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAlphaResourceOrderRequestApiDoc {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" additionalContactEmails: ") + .append(toIndentedString(additionalContactEmails)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" trafficOrigin: ") + .append(toIndentedString(trafficOrigin)) + .append(newLine) + .append(" trafficType: ") + .append(toIndentedString(trafficType)) + .append(newLine) + .append(" requirements: ") + .append(toIndentedString(requirements)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAlphaWebhookNotifApiDoc.java b/src/main/java/com/infobip/model/ResourcesAlphaWebhookNotifApiDoc.java new file mode 100644 index 0000000..b9efb3c --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAlphaWebhookNotifApiDoc.java @@ -0,0 +1,346 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesAlphaWebhookNotifApiDoc model. + */ +public class ResourcesAlphaWebhookNotifApiDoc implements ResourcesWebhookNotifApiDocResultContent { + + private String id; + + /** + * Status of the resource request. + */ + public enum StatusEnum { + UPDATE_REQUESTED("UPDATE_REQUESTED"), + UPDATE_REQUESTED_BY_INTERNAL_REVIEWER("UPDATE_REQUESTED_BY_INTERNAL_REVIEWER"), + REJECTED("REJECTED"), + COMPLETED("COMPLETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum enumElement : StatusEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private StatusEnum status; + + private List requirementsFeedback = null; + + private String note; + + private ResourcesWebhookNotifContentType type; + + /** + * Sets id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @param id + * @return This {@link ResourcesAlphaWebhookNotifApiDoc instance}. + */ + public ResourcesAlphaWebhookNotifApiDoc id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + /** + * Sets status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @param status + * @return This {@link ResourcesAlphaWebhookNotifApiDoc instance}. + */ + public ResourcesAlphaWebhookNotifApiDoc status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Returns status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @return status + */ + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + /** + * Sets status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(StatusEnum status) { + this.status = status; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedback + * @return This {@link ResourcesAlphaWebhookNotifApiDoc instance}. + */ + public ResourcesAlphaWebhookNotifApiDoc requirementsFeedback( + List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + return this; + } + + /** + * Adds and item into requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedbackItem The item to be added to the list. + * @return This {@link ResourcesAlphaWebhookNotifApiDoc instance}. + */ + public ResourcesAlphaWebhookNotifApiDoc addRequirementsFeedbackItem( + ResourcesFilledRequirementFeedbackApiDoc requirementsFeedbackItem) { + if (this.requirementsFeedback == null) { + this.requirementsFeedback = new ArrayList<>(); + } + this.requirementsFeedback.add(requirementsFeedbackItem); + return this; + } + + /** + * Returns requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @return requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public List getRequirementsFeedback() { + return requirementsFeedback; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public void setRequirementsFeedback(List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + * @return This {@link ResourcesAlphaWebhookNotifApiDoc instance}. + */ + public ResourcesAlphaWebhookNotifApiDoc note(String note) { + this.note = note; + return this; + } + + /** + * Returns note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @return note + */ + @JsonProperty("note") + public String getNote() { + return note; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + */ + @JsonProperty("note") + public void setNote(String note) { + this.note = note; + } + + /** + * Sets type. + * + * @param type + * @return This {@link ResourcesAlphaWebhookNotifApiDoc instance}. + */ + public ResourcesAlphaWebhookNotifApiDoc type(ResourcesWebhookNotifContentType type) { + this.type = type; + return this; + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public ResourcesWebhookNotifContentType getType() { + return type; + } + + /** + * Sets type. + * + * @param type + */ + @JsonProperty("type") + public void setType(ResourcesWebhookNotifContentType type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAlphaWebhookNotifApiDoc resourcesAlphaWebhookNotifApiDoc = (ResourcesAlphaWebhookNotifApiDoc) o; + return Objects.equals(this.id, resourcesAlphaWebhookNotifApiDoc.id) + && Objects.equals(this.status, resourcesAlphaWebhookNotifApiDoc.status) + && Objects.equals(this.requirementsFeedback, resourcesAlphaWebhookNotifApiDoc.requirementsFeedback) + && Objects.equals(this.note, resourcesAlphaWebhookNotifApiDoc.note) + && Objects.equals(this.type, resourcesAlphaWebhookNotifApiDoc.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, requirementsFeedback, note, type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAlphaWebhookNotifApiDoc {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" requirementsFeedback: ") + .append(toIndentedString(requirementsFeedback)) + .append(newLine) + .append(" note: ") + .append(toIndentedString(note)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAppleCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesAppleCoverageInfo.java new file mode 100644 index 0000000..1863e94 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAppleCoverageInfo.java @@ -0,0 +1,328 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the sender coverage. + */ +public class ResourcesAppleCoverageInfo implements ResourcesIbResourceCoverageInfo { + + private String resource; + + private String displayName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesAppleCoverageInfo instance}. + */ + public ResourcesAppleCoverageInfo resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + * @return This {@link ResourcesAppleCoverageInfo instance}. + */ + public ResourcesAppleCoverageInfo displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Returns displayName. + *

+ * Field description: + * Display name. + * + * @return displayName + */ + @JsonProperty("displayName") + public String getDisplayName() { + return displayName; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + */ + @JsonProperty("displayName") + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesAppleCoverageInfo instance}. + */ + public ResourcesAppleCoverageInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesAppleCoverageInfo instance}. + */ + public ResourcesAppleCoverageInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + * + * @param capabilities + * @return This {@link ResourcesAppleCoverageInfo instance}. + */ + public ResourcesAppleCoverageInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesAppleCoverageInfo instance}. + */ + public ResourcesAppleCoverageInfo addCapabilitiesItem(ResourcesIbResourceCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesAppleCoverageInfo instance}. + */ + public ResourcesAppleCoverageInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAppleCoverageInfo resourcesAppleCoverageInfo = (ResourcesAppleCoverageInfo) o; + return Objects.equals(this.resource, resourcesAppleCoverageInfo.resource) + && Objects.equals(this.displayName, resourcesAppleCoverageInfo.displayName) + && Objects.equals(this.countryCode, resourcesAppleCoverageInfo.countryCode) + && Objects.equals(this.countryName, resourcesAppleCoverageInfo.countryName) + && Objects.equals(this.capabilities, resourcesAppleCoverageInfo.capabilities) + && Objects.equals(this.resourceType, resourcesAppleCoverageInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resource, displayName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAppleCoverageInfo {") + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" displayName: ") + .append(toIndentedString(displayName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAppleCoverageKey.java b/src/main/java/com/infobip/model/ResourcesAppleCoverageKey.java new file mode 100644 index 0000000..49844d0 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAppleCoverageKey.java @@ -0,0 +1,215 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesAppleCoverageKey model. + */ +public class ResourcesAppleCoverageKey extends ResourcesIbResourceCoverageKey { + + private String resource; + + private String displayName; + + private String countryCode; + + /** + * Constructs a new {@link ResourcesAppleCoverageKey} instance. + */ + public ResourcesAppleCoverageKey() { + super("APPLE_RESOURCE"); + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @param resource + * @return This {@link ResourcesAppleCoverageKey instance}. + */ + public ResourcesAppleCoverageKey resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + * @return This {@link ResourcesAppleCoverageKey instance}. + */ + public ResourcesAppleCoverageKey displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Returns displayName. + *

+ * Field description: + * Display name. + * + * @return displayName + */ + @JsonProperty("displayName") + public String getDisplayName() { + return displayName; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + */ + @JsonProperty("displayName") + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesAppleCoverageKey instance}. + */ + public ResourcesAppleCoverageKey countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAppleCoverageKey resourcesAppleCoverageKey = (ResourcesAppleCoverageKey) o; + return Objects.equals(this.resource, resourcesAppleCoverageKey.resource) + && Objects.equals(this.displayName, resourcesAppleCoverageKey.displayName) + && Objects.equals(this.countryCode, resourcesAppleCoverageKey.countryCode) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resource, displayName, countryCode, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAppleCoverageKey {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" displayName: ") + .append(toIndentedString(displayName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAppleMbMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesAppleMbMoActionDocs.java new file mode 100644 index 0000000..e287217 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAppleMbMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAppleMbMoHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesAppleMbMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesAppleMbMoActionDocs} instance. + */ + public ResourcesAppleMbMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAppleMbMoActionDocs resourcesAppleMbMoActionDocs = (ResourcesAppleMbMoActionDocs) o; + return Objects.equals(this.type, resourcesAppleMbMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAppleMbMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAppleMbMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesAppleMbMoConfigurationRequest.java new file mode 100644 index 0000000..9e1601f --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAppleMbMoConfigurationRequest.java @@ -0,0 +1,269 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesAppleMbMoConfigurationRequest model. + */ +public class ResourcesAppleMbMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private ResourcesPlatformDocs platform; + + private String resource; + + private ResourcesAppleMbMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + /** + * Constructs a new {@link ResourcesAppleMbMoConfigurationRequest} instance. + */ + public ResourcesAppleMbMoConfigurationRequest() { + super("APPLE_MB"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesAppleMbMoConfigurationRequest instance}. + */ + public ResourcesAppleMbMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesAppleMbMoConfigurationRequest instance}. + */ + public ResourcesAppleMbMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesAppleMbMoConfigurationRequest instance}. + */ + public ResourcesAppleMbMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesAppleMbMoConfigurationRequest instance}. + */ + public ResourcesAppleMbMoConfigurationRequest forwarding(ResourcesAppleMbMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesAppleMbMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesAppleMbMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesAppleMbMoConfigurationRequest instance}. + */ + public ResourcesAppleMbMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAppleMbMoConfigurationRequest resourcesAppleMbMoConfigurationRequest = + (ResourcesAppleMbMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesAppleMbMoConfigurationRequest.resourceKey) + && Objects.equals(this.platform, resourcesAppleMbMoConfigurationRequest.platform) + && Objects.equals(this.resource, resourcesAppleMbMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesAppleMbMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesAppleMbMoConfigurationRequest.conversations) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, platform, resource, forwarding, conversations, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAppleMbMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAppleMbMoHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesAppleMbMoHttpForwardDocs.java new file mode 100644 index 0000000..9c20e8d --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAppleMbMoHttpForwardDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesAppleMbMoHttpForwardDocs model. + */ +public class ResourcesAppleMbMoHttpForwardDocs extends ResourcesAppleMbMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesAppleMbMoHttpForwardDocs} instance. + */ + public ResourcesAppleMbMoHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesAppleMbMoHttpForwardDocs instance}. + */ + public ResourcesAppleMbMoHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesAppleMbMoHttpForwardDocs instance}. + */ + public ResourcesAppleMbMoHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAppleMbMoHttpForwardDocs resourcesAppleMbMoHttpForwardDocs = (ResourcesAppleMbMoHttpForwardDocs) o; + return Objects.equals(this.url, resourcesAppleMbMoHttpForwardDocs.url) + && Objects.equals(this.format, resourcesAppleMbMoHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAppleMbMoHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAppleResourceFilter.java b/src/main/java/com/infobip/model/ResourcesAppleResourceFilter.java new file mode 100644 index 0000000..4bffe26 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAppleResourceFilter.java @@ -0,0 +1,110 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Apple filter for resources. + */ +public class ResourcesAppleResourceFilter extends ResourcesIbResourcesFilter { + + private String resource; + + /** + * Constructs a new {@link ResourcesAppleResourceFilter} instance. + */ + public ResourcesAppleResourceFilter() { + super("APPLE_RESOURCE"); + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesAppleResourceFilter instance}. + */ + public ResourcesAppleResourceFilter resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAppleResourceFilter resourcesAppleResourceFilter = (ResourcesAppleResourceFilter) o; + return Objects.equals(this.resource, resourcesAppleResourceFilter.resource) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resource, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAppleResourceFilter {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAppleResourceInfo.java b/src/main/java/com/infobip/model/ResourcesAppleResourceInfo.java new file mode 100644 index 0000000..36bf575 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAppleResourceInfo.java @@ -0,0 +1,340 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about Apple type of resource. + */ +public class ResourcesAppleResourceInfo implements ResourcesIbResourceInfo { + + private String resource; + + private String displayName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesAppleResourceInfo instance}. + */ + public ResourcesAppleResourceInfo resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + * @return This {@link ResourcesAppleResourceInfo instance}. + */ + public ResourcesAppleResourceInfo displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Returns displayName. + *

+ * Field description: + * Display name. + * + * @return displayName + */ + @JsonProperty("displayName") + public String getDisplayName() { + return displayName; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + */ + @JsonProperty("displayName") + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesAppleResourceInfo instance}. + */ + public ResourcesAppleResourceInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesAppleResourceInfo instance}. + */ + public ResourcesAppleResourceInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + * @return This {@link ResourcesAppleResourceInfo instance}. + */ + public ResourcesAppleResourceInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesAppleResourceInfo instance}. + */ + public ResourcesAppleResourceInfo addCapabilitiesItem(ResourcesResourceCapabilityChannel capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesAppleResourceInfo instance}. + */ + public ResourcesAppleResourceInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAppleResourceInfo resourcesAppleResourceInfo = (ResourcesAppleResourceInfo) o; + return Objects.equals(this.resource, resourcesAppleResourceInfo.resource) + && Objects.equals(this.displayName, resourcesAppleResourceInfo.displayName) + && Objects.equals(this.countryCode, resourcesAppleResourceInfo.countryCode) + && Objects.equals(this.countryName, resourcesAppleResourceInfo.countryName) + && Objects.equals(this.capabilities, resourcesAppleResourceInfo.capabilities) + && Objects.equals(this.resourceType, resourcesAppleResourceInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resource, displayName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAppleResourceInfo {") + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" displayName: ") + .append(toIndentedString(displayName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAttachment.java b/src/main/java/com/infobip/model/ResourcesAttachment.java new file mode 100644 index 0000000..cef7625 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAttachment.java @@ -0,0 +1,137 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Attachment. + */ +public class ResourcesAttachment { + + private String documentId; + + private ResourcesDocumentType documentType; + + /** + * Sets documentId. + *

+ * Field description: + * The ID of the document. + * + * @param documentId + * @return This {@link ResourcesAttachment instance}. + */ + public ResourcesAttachment documentId(String documentId) { + this.documentId = documentId; + return this; + } + + /** + * Returns documentId. + *

+ * Field description: + * The ID of the document. + * + * @return documentId + */ + @JsonProperty("documentId") + public String getDocumentId() { + return documentId; + } + + /** + * Sets documentId. + *

+ * Field description: + * The ID of the document. + * + * @param documentId + */ + @JsonProperty("documentId") + public void setDocumentId(String documentId) { + this.documentId = documentId; + } + + /** + * Sets documentType. + * + * @param documentType + * @return This {@link ResourcesAttachment instance}. + */ + public ResourcesAttachment documentType(ResourcesDocumentType documentType) { + this.documentType = documentType; + return this; + } + + /** + * Returns documentType. + * + * @return documentType + */ + @JsonProperty("documentType") + public ResourcesDocumentType getDocumentType() { + return documentType; + } + + /** + * Sets documentType. + * + * @param documentType + */ + @JsonProperty("documentType") + public void setDocumentType(ResourcesDocumentType documentType) { + this.documentType = documentType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAttachment resourcesAttachment = (ResourcesAttachment) o; + return Objects.equals(this.documentId, resourcesAttachment.documentId) + && Objects.equals(this.documentType, resourcesAttachment.documentType); + } + + @Override + public int hashCode() { + return Objects.hash(documentId, documentType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAttachment {") + .append(newLine) + .append(" documentId: ") + .append(toIndentedString(documentId)) + .append(newLine) + .append(" documentType: ") + .append(toIndentedString(documentType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAutoResponseActionRequest.java b/src/main/java/com/infobip/model/ResourcesAutoResponseActionRequest.java new file mode 100644 index 0000000..52ab1df --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAutoResponseActionRequest.java @@ -0,0 +1,189 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Auto-response action configuration. + */ +public class ResourcesAutoResponseActionRequest { + + private String message; + + private String sender; + + private ResourcesDeliveryTimeWindow deliveryTimeWindow; + + /** + * Sets message. + *

+ * Field description: + * Text that will be sent as a response message. + *

+ * The field is required. + * + * @param message + * @return This {@link ResourcesAutoResponseActionRequest instance}. + */ + public ResourcesAutoResponseActionRequest message(String message) { + this.message = message; + return this; + } + + /** + * Returns message. + *

+ * Field description: + * Text that will be sent as a response message. + *

+ * The field is required. + * + * @return message + */ + @JsonProperty("message") + public String getMessage() { + return message; + } + + /** + * Sets message. + *

+ * Field description: + * Text that will be sent as a response message. + *

+ * The field is required. + * + * @param message + */ + @JsonProperty("message") + public void setMessage(String message) { + this.message = message; + } + + /** + * Sets sender. + *

+ * Field description: + * If set, it will override the sender of the message in autoresponse sent to the user. + * + * @param sender + * @return This {@link ResourcesAutoResponseActionRequest instance}. + */ + public ResourcesAutoResponseActionRequest sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Returns sender. + *

+ * Field description: + * If set, it will override the sender of the message in autoresponse sent to the user. + * + * @return sender + */ + @JsonProperty("sender") + public String getSender() { + return sender; + } + + /** + * Sets sender. + *

+ * Field description: + * If set, it will override the sender of the message in autoresponse sent to the user. + * + * @param sender + */ + @JsonProperty("sender") + public void setSender(String sender) { + this.sender = sender; + } + + /** + * Sets deliveryTimeWindow. + * + * @param deliveryTimeWindow + * @return This {@link ResourcesAutoResponseActionRequest instance}. + */ + public ResourcesAutoResponseActionRequest deliveryTimeWindow(ResourcesDeliveryTimeWindow deliveryTimeWindow) { + this.deliveryTimeWindow = deliveryTimeWindow; + return this; + } + + /** + * Returns deliveryTimeWindow. + * + * @return deliveryTimeWindow + */ + @JsonProperty("deliveryTimeWindow") + public ResourcesDeliveryTimeWindow getDeliveryTimeWindow() { + return deliveryTimeWindow; + } + + /** + * Sets deliveryTimeWindow. + * + * @param deliveryTimeWindow + */ + @JsonProperty("deliveryTimeWindow") + public void setDeliveryTimeWindow(ResourcesDeliveryTimeWindow deliveryTimeWindow) { + this.deliveryTimeWindow = deliveryTimeWindow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAutoResponseActionRequest resourcesAutoResponseActionRequest = (ResourcesAutoResponseActionRequest) o; + return Objects.equals(this.message, resourcesAutoResponseActionRequest.message) + && Objects.equals(this.sender, resourcesAutoResponseActionRequest.sender) + && Objects.equals(this.deliveryTimeWindow, resourcesAutoResponseActionRequest.deliveryTimeWindow); + } + + @Override + public int hashCode() { + return Objects.hash(message, sender, deliveryTimeWindow); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAutoResponseActionRequest {") + .append(newLine) + .append(" message: ") + .append(toIndentedString(message)) + .append(newLine) + .append(" sender: ") + .append(toIndentedString(sender)) + .append(newLine) + .append(" deliveryTimeWindow: ") + .append(toIndentedString(deliveryTimeWindow)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesAutoResponseActionResponse.java b/src/main/java/com/infobip/model/ResourcesAutoResponseActionResponse.java new file mode 100644 index 0000000..f9a3376 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesAutoResponseActionResponse.java @@ -0,0 +1,191 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Auto-response action configuration. + */ +public class ResourcesAutoResponseActionResponse { + + private String message; + + private String sender; + + private ResourcesDeliveryTimeWindowResponse deliveryTimeWindow; + + /** + * Sets message. + *

+ * Field description: + * Text that will be sent as a response message. + *

+ * The field is required. + * + * @param message + * @return This {@link ResourcesAutoResponseActionResponse instance}. + */ + public ResourcesAutoResponseActionResponse message(String message) { + this.message = message; + return this; + } + + /** + * Returns message. + *

+ * Field description: + * Text that will be sent as a response message. + *

+ * The field is required. + * + * @return message + */ + @JsonProperty("message") + public String getMessage() { + return message; + } + + /** + * Sets message. + *

+ * Field description: + * Text that will be sent as a response message. + *

+ * The field is required. + * + * @param message + */ + @JsonProperty("message") + public void setMessage(String message) { + this.message = message; + } + + /** + * Sets sender. + *

+ * Field description: + * If set, it will override the sender of the message in autoresponse sent to the user. + * + * @param sender + * @return This {@link ResourcesAutoResponseActionResponse instance}. + */ + public ResourcesAutoResponseActionResponse sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Returns sender. + *

+ * Field description: + * If set, it will override the sender of the message in autoresponse sent to the user. + * + * @return sender + */ + @JsonProperty("sender") + public String getSender() { + return sender; + } + + /** + * Sets sender. + *

+ * Field description: + * If set, it will override the sender of the message in autoresponse sent to the user. + * + * @param sender + */ + @JsonProperty("sender") + public void setSender(String sender) { + this.sender = sender; + } + + /** + * Sets deliveryTimeWindow. + * + * @param deliveryTimeWindow + * @return This {@link ResourcesAutoResponseActionResponse instance}. + */ + public ResourcesAutoResponseActionResponse deliveryTimeWindow( + ResourcesDeliveryTimeWindowResponse deliveryTimeWindow) { + this.deliveryTimeWindow = deliveryTimeWindow; + return this; + } + + /** + * Returns deliveryTimeWindow. + * + * @return deliveryTimeWindow + */ + @JsonProperty("deliveryTimeWindow") + public ResourcesDeliveryTimeWindowResponse getDeliveryTimeWindow() { + return deliveryTimeWindow; + } + + /** + * Sets deliveryTimeWindow. + * + * @param deliveryTimeWindow + */ + @JsonProperty("deliveryTimeWindow") + public void setDeliveryTimeWindow(ResourcesDeliveryTimeWindowResponse deliveryTimeWindow) { + this.deliveryTimeWindow = deliveryTimeWindow; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesAutoResponseActionResponse resourcesAutoResponseActionResponse = + (ResourcesAutoResponseActionResponse) o; + return Objects.equals(this.message, resourcesAutoResponseActionResponse.message) + && Objects.equals(this.sender, resourcesAutoResponseActionResponse.sender) + && Objects.equals(this.deliveryTimeWindow, resourcesAutoResponseActionResponse.deliveryTimeWindow); + } + + @Override + public int hashCode() { + return Objects.hash(message, sender, deliveryTimeWindow); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesAutoResponseActionResponse {") + .append(newLine) + .append(" message: ") + .append(toIndentedString(message)) + .append(newLine) + .append(" sender: ") + .append(toIndentedString(sender)) + .append(newLine) + .append(" deliveryTimeWindow: ") + .append(toIndentedString(deliveryTimeWindow)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesBlockLevelRequest.java b/src/main/java/com/infobip/model/ResourcesBlockLevelRequest.java new file mode 100644 index 0000000..d338c12 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesBlockLevelRequest.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The level of block configuration. + */ +public enum ResourcesBlockLevelRequest { + SENDER("FROM_SENDER"), + ANY_SENDER("FROM_ANY_SENDER"); + + private final String value; + + ResourcesBlockLevelRequest(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesBlockLevelRequest fromValue(String value) { + for (ResourcesBlockLevelRequest enumElement : ResourcesBlockLevelRequest.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesBlockLevelResponse.java b/src/main/java/com/infobip/model/ResourcesBlockLevelResponse.java new file mode 100644 index 0000000..36173fc --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesBlockLevelResponse.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The level of block configuration. If the value is <code>CUSTOM_NOT_EDITABLE</code>, then the value is not manageable by API. + */ +public enum ResourcesBlockLevelResponse { + FROM_SENDER("FROM_SENDER"), + FROM_ANY_SENDER("FROM_ANY_SENDER"), + CUSTOM_NOT_EDITABLE("CUSTOM_NOT_EDITABLE"); + + private final String value; + + ResourcesBlockLevelResponse(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesBlockLevelResponse fromValue(String value) { + for (ResourcesBlockLevelResponse enumElement : ResourcesBlockLevelResponse.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesBlockListConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesBlockListConfigurationRequest.java new file mode 100644 index 0000000..b5e71ed --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesBlockListConfigurationRequest.java @@ -0,0 +1,141 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Whitelist or blacklist the traffic of MT messages. + */ +public class ResourcesBlockListConfigurationRequest { + + private ResourcesBlockListConfigurationType type; + + private ResourcesBlockLevelRequest level; + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + * @return This {@link ResourcesBlockListConfigurationRequest instance}. + */ + public ResourcesBlockListConfigurationRequest type(ResourcesBlockListConfigurationType type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public ResourcesBlockListConfigurationType getType() { + return type; + } + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(ResourcesBlockListConfigurationType type) { + this.type = type; + } + + /** + * Sets level. + *

+ * The field is required. + * + * @param level + * @return This {@link ResourcesBlockListConfigurationRequest instance}. + */ + public ResourcesBlockListConfigurationRequest level(ResourcesBlockLevelRequest level) { + this.level = level; + return this; + } + + /** + * Returns level. + *

+ * The field is required. + * + * @return level + */ + @JsonProperty("level") + public ResourcesBlockLevelRequest getLevel() { + return level; + } + + /** + * Sets level. + *

+ * The field is required. + * + * @param level + */ + @JsonProperty("level") + public void setLevel(ResourcesBlockLevelRequest level) { + this.level = level; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesBlockListConfigurationRequest resourcesBlockListConfigurationRequest = + (ResourcesBlockListConfigurationRequest) o; + return Objects.equals(this.type, resourcesBlockListConfigurationRequest.type) + && Objects.equals(this.level, resourcesBlockListConfigurationRequest.level); + } + + @Override + public int hashCode() { + return Objects.hash(type, level); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesBlockListConfigurationRequest {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" level: ") + .append(toIndentedString(level)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesBlockListConfigurationResponse.java b/src/main/java/com/infobip/model/ResourcesBlockListConfigurationResponse.java new file mode 100644 index 0000000..426477a --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesBlockListConfigurationResponse.java @@ -0,0 +1,141 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Whitelist or blacklist the traffic of MT messages. + */ +public class ResourcesBlockListConfigurationResponse { + + private ResourcesBlockListConfigurationType type; + + private ResourcesBlockLevelResponse level; + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + * @return This {@link ResourcesBlockListConfigurationResponse instance}. + */ + public ResourcesBlockListConfigurationResponse type(ResourcesBlockListConfigurationType type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public ResourcesBlockListConfigurationType getType() { + return type; + } + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(ResourcesBlockListConfigurationType type) { + this.type = type; + } + + /** + * Sets level. + *

+ * The field is required. + * + * @param level + * @return This {@link ResourcesBlockListConfigurationResponse instance}. + */ + public ResourcesBlockListConfigurationResponse level(ResourcesBlockLevelResponse level) { + this.level = level; + return this; + } + + /** + * Returns level. + *

+ * The field is required. + * + * @return level + */ + @JsonProperty("level") + public ResourcesBlockLevelResponse getLevel() { + return level; + } + + /** + * Sets level. + *

+ * The field is required. + * + * @param level + */ + @JsonProperty("level") + public void setLevel(ResourcesBlockLevelResponse level) { + this.level = level; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesBlockListConfigurationResponse resourcesBlockListConfigurationResponse = + (ResourcesBlockListConfigurationResponse) o; + return Objects.equals(this.type, resourcesBlockListConfigurationResponse.type) + && Objects.equals(this.level, resourcesBlockListConfigurationResponse.level); + } + + @Override + public int hashCode() { + return Objects.hash(type, level); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesBlockListConfigurationResponse {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" level: ") + .append(toIndentedString(level)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesBlockListConfigurationType.java b/src/main/java/com/infobip/model/ResourcesBlockListConfigurationType.java new file mode 100644 index 0000000..c8b2c5c --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesBlockListConfigurationType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of block configuration. Defines whether you are configuring blocking (blacklisting) or unblocking (whitelisting) configuration. + */ +public enum ResourcesBlockListConfigurationType { + BLOCK("BLOCK"), + UNBLOCK("UNBLOCK"); + + private final String value; + + ResourcesBlockListConfigurationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesBlockListConfigurationType fromValue(String value) { + for (ResourcesBlockListConfigurationType enumElement : ResourcesBlockListConfigurationType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesCategory.java b/src/main/java/com/infobip/model/ResourcesCategory.java new file mode 100644 index 0000000..e451480 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesCategory.java @@ -0,0 +1,52 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Category of the requirement. + */ +public enum ResourcesCategory { + BUSINESS_DETAILS("BUSINESS_DETAILS"), + CONTACT_INFORMATION("CONTACT_INFORMATION"), + CUSTOMER_SUPPORT_INFORMATION("CUSTOMER_SUPPORT_INFORMATION"), + MARKET_SPECIFIC_DETAILS("MARKET_SPECIFIC_DETAILS"), + USE_CASE_DETAILS("USE_CASE_DETAILS"), + CONFIRMATION("CONFIRMATION"), + OTHER("OTHER"); + + private final String value; + + ResourcesCategory(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesCategory fromValue(String value) { + for (ResourcesCategory enumElement : ResourcesCategory.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesConfigurationType.java b/src/main/java/com/infobip/model/ResourcesConfigurationType.java new file mode 100644 index 0000000..2ff8af0 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesConfigurationType.java @@ -0,0 +1,62 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Channel type. + */ +public enum ResourcesConfigurationType { + SMS("SMS"), + MMS("MMS"), + WHATSAPP("WHATSAPP"), + RCS("RCS"), + VIBER_BM("VIBER_BM"), + APPLE_MB("APPLE_MB"), + LINE_OA("LINE_OA"), + KAKAO_SANGDAM("KAKAO_SANGDAM"), + MESSENGER("MESSENGER"), + INSTAGRAM_DM("INSTAGRAM_DM"), + ZALO_ZNS("ZALO_ZNS"), + TELEGRAM("TELEGRAM"), + VIBER_BOT("VIBER_BOT"), + EMAIL("EMAIL"), + ZALO_FOLLOWER("ZALO_FOLLOWER"), + OPEN_CHANNEL("OPEN_CHANNEL"), + TIKTOK_BM("TIKTOK_BM"); + + private final String value; + + ResourcesConfigurationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesConfigurationType fromValue(String value) { + for (ResourcesConfigurationType enumElement : ResourcesConfigurationType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesDayOfWeek.java b/src/main/java/com/infobip/model/ResourcesDayOfWeek.java new file mode 100644 index 0000000..a2c498b --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesDayOfWeek.java @@ -0,0 +1,52 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Days which are included in the delivery time window. + */ +public enum ResourcesDayOfWeek { + MONDAY("MONDAY"), + TUESDAY("TUESDAY"), + WEDNESDAY("WEDNESDAY"), + THURSDAY("THURSDAY"), + FRIDAY("FRIDAY"), + SATURDAY("SATURDAY"), + SUNDAY("SUNDAY"); + + private final String value; + + ResourcesDayOfWeek(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesDayOfWeek fromValue(String value) { + for (ResourcesDayOfWeek enumElement : ResourcesDayOfWeek.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesDeliveryTimeWindow.java b/src/main/java/com/infobip/model/ResourcesDeliveryTimeWindow.java new file mode 100644 index 0000000..451dfc9 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesDeliveryTimeWindow.java @@ -0,0 +1,268 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Used to specify a time-window in which a response message is allowed to be sent. If not defined there is no limitation when message will be sent. + */ +public class ResourcesDeliveryTimeWindow { + + private String from; + + private String to; + + private Set days = new LinkedHashSet<>(); + + private ResourcesDeliveryTimeZone deliveryTimeZone; + + /** + * Sets from. + *

+ * Field description: + * Exact time of day in which the sending can start. Consists of hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @param from + * @return This {@link ResourcesDeliveryTimeWindow instance}. + */ + public ResourcesDeliveryTimeWindow from(String from) { + this.from = from; + return this; + } + + /** + * Returns from. + *

+ * Field description: + * Exact time of day in which the sending can start. Consists of hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @return from + */ + @JsonProperty("from") + public String getFrom() { + return from; + } + + /** + * Sets from. + *

+ * Field description: + * Exact time of day in which the sending can start. Consists of hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @param from + */ + @JsonProperty("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Sets to. + *

+ * Field description: + * Exact time of day in which the sending will end. Consists of an hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @param to + * @return This {@link ResourcesDeliveryTimeWindow instance}. + */ + public ResourcesDeliveryTimeWindow to(String to) { + this.to = to; + return this; + } + + /** + * Returns to. + *

+ * Field description: + * Exact time of day in which the sending will end. Consists of an hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @return to + */ + @JsonProperty("to") + public String getTo() { + return to; + } + + /** + * Sets to. + *

+ * Field description: + * Exact time of day in which the sending will end. Consists of an hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @param to + */ + @JsonProperty("to") + public void setTo(String to) { + this.to = to; + } + + /** + * Sets days. + *

+ * Field description: + * Days which are included in the delivery time window. + *

+ * The field is required. + * + * @param days + * @return This {@link ResourcesDeliveryTimeWindow instance}. + */ + public ResourcesDeliveryTimeWindow days(Set days) { + this.days = days; + return this; + } + + /** + * Adds and item into days. + *

+ * Field description: + * Days which are included in the delivery time window. + *

+ * The field is required. + * + * @param daysItem The item to be added to the list. + * @return This {@link ResourcesDeliveryTimeWindow instance}. + */ + public ResourcesDeliveryTimeWindow addDaysItem(ResourcesDayOfWeek daysItem) { + if (this.days == null) { + this.days = new LinkedHashSet<>(); + } + this.days.add(daysItem); + return this; + } + + /** + * Returns days. + *

+ * Field description: + * Days which are included in the delivery time window. + *

+ * The field is required. + * + * @return days + */ + @JsonProperty("days") + public Set getDays() { + return days; + } + + /** + * Sets days. + *

+ * Field description: + * Days which are included in the delivery time window. + *

+ * The field is required. + * + * @param days + */ + @JsonProperty("days") + public void setDays(Set days) { + this.days = days; + } + + /** + * Sets deliveryTimeZone. + * + * @param deliveryTimeZone + * @return This {@link ResourcesDeliveryTimeWindow instance}. + */ + public ResourcesDeliveryTimeWindow deliveryTimeZone(ResourcesDeliveryTimeZone deliveryTimeZone) { + this.deliveryTimeZone = deliveryTimeZone; + return this; + } + + /** + * Returns deliveryTimeZone. + * + * @return deliveryTimeZone + */ + @JsonProperty("deliveryTimeZone") + public ResourcesDeliveryTimeZone getDeliveryTimeZone() { + return deliveryTimeZone; + } + + /** + * Sets deliveryTimeZone. + * + * @param deliveryTimeZone + */ + @JsonProperty("deliveryTimeZone") + public void setDeliveryTimeZone(ResourcesDeliveryTimeZone deliveryTimeZone) { + this.deliveryTimeZone = deliveryTimeZone; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesDeliveryTimeWindow resourcesDeliveryTimeWindow = (ResourcesDeliveryTimeWindow) o; + return Objects.equals(this.from, resourcesDeliveryTimeWindow.from) + && Objects.equals(this.to, resourcesDeliveryTimeWindow.to) + && Objects.equals(this.days, resourcesDeliveryTimeWindow.days) + && Objects.equals(this.deliveryTimeZone, resourcesDeliveryTimeWindow.deliveryTimeZone); + } + + @Override + public int hashCode() { + return Objects.hash(from, to, days, deliveryTimeZone); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesDeliveryTimeWindow {") + .append(newLine) + .append(" from: ") + .append(toIndentedString(from)) + .append(newLine) + .append(" to: ") + .append(toIndentedString(to)) + .append(newLine) + .append(" days: ") + .append(toIndentedString(days)) + .append(newLine) + .append(" deliveryTimeZone: ") + .append(toIndentedString(deliveryTimeZone)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesDeliveryTimeWindowResponse.java b/src/main/java/com/infobip/model/ResourcesDeliveryTimeWindowResponse.java new file mode 100644 index 0000000..dc2d2f0 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesDeliveryTimeWindowResponse.java @@ -0,0 +1,275 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Used to specify a time-window in which a response message is allowed to be sent. If not defined there is no limitation when message will be sent. + */ +public class ResourcesDeliveryTimeWindowResponse { + + private String from; + + private String to; + + private Set days = new LinkedHashSet<>(); + + private ResourcesDeliveryTimeZoneResponse deliveryTimeZone; + + /** + * Sets from. + *

+ * Field description: + * Exact time of day in which the sending can start. Consists of hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @param from + * @return This {@link ResourcesDeliveryTimeWindowResponse instance}. + */ + public ResourcesDeliveryTimeWindowResponse from(String from) { + this.from = from; + return this; + } + + /** + * Returns from. + *

+ * Field description: + * Exact time of day in which the sending can start. Consists of hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @return from + */ + @JsonProperty("from") + public String getFrom() { + return from; + } + + /** + * Sets from. + *

+ * Field description: + * Exact time of day in which the sending can start. Consists of hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @param from + */ + @JsonProperty("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Sets to. + *

+ * Field description: + * Exact time of day in which the sending will end. Consists of an hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @param to + * @return This {@link ResourcesDeliveryTimeWindowResponse instance}. + */ + public ResourcesDeliveryTimeWindowResponse to(String to) { + this.to = to; + return this; + } + + /** + * Returns to. + *

+ * Field description: + * Exact time of day in which the sending will end. Consists of an hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @return to + */ + @JsonProperty("to") + public String getTo() { + return to; + } + + /** + * Sets to. + *

+ * Field description: + * Exact time of day in which the sending will end. Consists of an hour and minute properties, both mandatory. Time is expressed in the UTC time zone. Formatted as <code>HH:mm</code>. + *

+ * The field is required. + * + * @param to + */ + @JsonProperty("to") + public void setTo(String to) { + this.to = to; + } + + /** + * Sets days. + *

+ * Field description: + * Days which are included in the delivery time window. + *

+ * The field is required. + * + * @param days + * @return This {@link ResourcesDeliveryTimeWindowResponse instance}. + */ + public ResourcesDeliveryTimeWindowResponse days(Set days) { + this.days = days; + return this; + } + + /** + * Adds and item into days. + *

+ * Field description: + * Days which are included in the delivery time window. + *

+ * The field is required. + * + * @param daysItem The item to be added to the list. + * @return This {@link ResourcesDeliveryTimeWindowResponse instance}. + */ + public ResourcesDeliveryTimeWindowResponse addDaysItem(ResourcesDayOfWeek daysItem) { + if (this.days == null) { + this.days = new LinkedHashSet<>(); + } + this.days.add(daysItem); + return this; + } + + /** + * Returns days. + *

+ * Field description: + * Days which are included in the delivery time window. + *

+ * The field is required. + * + * @return days + */ + @JsonProperty("days") + public Set getDays() { + return days; + } + + /** + * Sets days. + *

+ * Field description: + * Days which are included in the delivery time window. + *

+ * The field is required. + * + * @param days + */ + @JsonProperty("days") + public void setDays(Set days) { + this.days = days; + } + + /** + * Sets deliveryTimeZone. + *

+ * The field is required. + * + * @param deliveryTimeZone + * @return This {@link ResourcesDeliveryTimeWindowResponse instance}. + */ + public ResourcesDeliveryTimeWindowResponse deliveryTimeZone(ResourcesDeliveryTimeZoneResponse deliveryTimeZone) { + this.deliveryTimeZone = deliveryTimeZone; + return this; + } + + /** + * Returns deliveryTimeZone. + *

+ * The field is required. + * + * @return deliveryTimeZone + */ + @JsonProperty("deliveryTimeZone") + public ResourcesDeliveryTimeZoneResponse getDeliveryTimeZone() { + return deliveryTimeZone; + } + + /** + * Sets deliveryTimeZone. + *

+ * The field is required. + * + * @param deliveryTimeZone + */ + @JsonProperty("deliveryTimeZone") + public void setDeliveryTimeZone(ResourcesDeliveryTimeZoneResponse deliveryTimeZone) { + this.deliveryTimeZone = deliveryTimeZone; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesDeliveryTimeWindowResponse resourcesDeliveryTimeWindowResponse = + (ResourcesDeliveryTimeWindowResponse) o; + return Objects.equals(this.from, resourcesDeliveryTimeWindowResponse.from) + && Objects.equals(this.to, resourcesDeliveryTimeWindowResponse.to) + && Objects.equals(this.days, resourcesDeliveryTimeWindowResponse.days) + && Objects.equals(this.deliveryTimeZone, resourcesDeliveryTimeWindowResponse.deliveryTimeZone); + } + + @Override + public int hashCode() { + return Objects.hash(from, to, days, deliveryTimeZone); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesDeliveryTimeWindowResponse {") + .append(newLine) + .append(" from: ") + .append(toIndentedString(from)) + .append(newLine) + .append(" to: ") + .append(toIndentedString(to)) + .append(newLine) + .append(" days: ") + .append(toIndentedString(days)) + .append(newLine) + .append(" deliveryTimeZone: ") + .append(toIndentedString(deliveryTimeZone)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesDeliveryTimeZone.java b/src/main/java/com/infobip/model/ResourcesDeliveryTimeZone.java new file mode 100644 index 0000000..23e4269 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesDeliveryTimeZone.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Sending time zone. If <code>null</code> is sent, <code>User time zone</code> will be set. + */ +public enum ResourcesDeliveryTimeZone { + USER_TIME_ZONE("USER_TIME_ZONE"), + DESTINATION_TIME_ZONE("DESTINATION_TIME_ZONE"); + + private final String value; + + ResourcesDeliveryTimeZone(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesDeliveryTimeZone fromValue(String value) { + for (ResourcesDeliveryTimeZone enumElement : ResourcesDeliveryTimeZone.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesDeliveryTimeZoneResponse.java b/src/main/java/com/infobip/model/ResourcesDeliveryTimeZoneResponse.java new file mode 100644 index 0000000..1c5acda --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesDeliveryTimeZoneResponse.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Sending time zone. If the value is <code>CUSTOM_NOT_EDITABLE</code>, then the value is not manageable by API. + */ +public enum ResourcesDeliveryTimeZoneResponse { + USER_TIME_ZONE("USER_TIME_ZONE"), + DESTINATION_TIME_ZONE("DESTINATION_TIME_ZONE"), + CUSTOM_NOT_EDITABLE("CUSTOM_NOT_EDITABLE"); + + private final String value; + + ResourcesDeliveryTimeZoneResponse(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesDeliveryTimeZoneResponse fromValue(String value) { + for (ResourcesDeliveryTimeZoneResponse enumElement : ResourcesDeliveryTimeZoneResponse.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesDocumentIdentifier.java b/src/main/java/com/infobip/model/ResourcesDocumentIdentifier.java new file mode 100644 index 0000000..5ae1bb1 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesDocumentIdentifier.java @@ -0,0 +1,100 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesDocumentIdentifier model. + */ +public class ResourcesDocumentIdentifier { + + private String documentId; + + /** + * Sets documentId. + *

+ * Field description: + * The ID of the document. + * + * @param documentId + * @return This {@link ResourcesDocumentIdentifier instance}. + */ + public ResourcesDocumentIdentifier documentId(String documentId) { + this.documentId = documentId; + return this; + } + + /** + * Returns documentId. + *

+ * Field description: + * The ID of the document. + * + * @return documentId + */ + @JsonProperty("documentId") + public String getDocumentId() { + return documentId; + } + + /** + * Sets documentId. + *

+ * Field description: + * The ID of the document. + * + * @param documentId + */ + @JsonProperty("documentId") + public void setDocumentId(String documentId) { + this.documentId = documentId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesDocumentIdentifier resourcesDocumentIdentifier = (ResourcesDocumentIdentifier) o; + return Objects.equals(this.documentId, resourcesDocumentIdentifier.documentId); + } + + @Override + public int hashCode() { + return Objects.hash(documentId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesDocumentIdentifier {") + .append(newLine) + .append(" documentId: ") + .append(toIndentedString(documentId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesDocumentRequirementSpec.java b/src/main/java/com/infobip/model/ResourcesDocumentRequirementSpec.java new file mode 100644 index 0000000..7ba7a1d --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesDocumentRequirementSpec.java @@ -0,0 +1,371 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesDocumentRequirementSpec model. + */ +public class ResourcesDocumentRequirementSpec extends ResourcesRequirementSpec { + + private String key; + + private String name; + + private String description; + + private Boolean required; + + private Boolean multipleValuesSupported; + + private ResourcesCategory category; + + private ResourcesAttachment attachment; + + /** + * Constructs a new {@link ResourcesDocumentRequirementSpec} instance. + */ + public ResourcesDocumentRequirementSpec() { + super("DOCUMENT"); + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + * @return This {@link ResourcesDocumentRequirementSpec instance}. + */ + public ResourcesDocumentRequirementSpec key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * Key of the requirement. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + * @return This {@link ResourcesDocumentRequirementSpec instance}. + */ + public ResourcesDocumentRequirementSpec name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * Name of the requirement. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + * @return This {@link ResourcesDocumentRequirementSpec instance}. + */ + public ResourcesDocumentRequirementSpec description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Description of the requirement. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + * @return This {@link ResourcesDocumentRequirementSpec instance}. + */ + public ResourcesDocumentRequirementSpec required(Boolean required) { + this.required = required; + return this; + } + + /** + * Returns required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @return required + */ + @JsonProperty("required") + public Boolean getRequired() { + return required; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + */ + @JsonProperty("required") + public void setRequired(Boolean required) { + this.required = required; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + * @return This {@link ResourcesDocumentRequirementSpec instance}. + */ + public ResourcesDocumentRequirementSpec multipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + return this; + } + + /** + * Returns multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @return multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public Boolean getMultipleValuesSupported() { + return multipleValuesSupported; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public void setMultipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + } + + /** + * Sets category. + * + * @param category + * @return This {@link ResourcesDocumentRequirementSpec instance}. + */ + public ResourcesDocumentRequirementSpec category(ResourcesCategory category) { + this.category = category; + return this; + } + + /** + * Returns category. + * + * @return category + */ + @JsonProperty("category") + public ResourcesCategory getCategory() { + return category; + } + + /** + * Sets category. + * + * @param category + */ + @JsonProperty("category") + public void setCategory(ResourcesCategory category) { + this.category = category; + } + + /** + * Sets attachment. + * + * @param attachment + * @return This {@link ResourcesDocumentRequirementSpec instance}. + */ + public ResourcesDocumentRequirementSpec attachment(ResourcesAttachment attachment) { + this.attachment = attachment; + return this; + } + + /** + * Returns attachment. + * + * @return attachment + */ + @JsonProperty("attachment") + public ResourcesAttachment getAttachment() { + return attachment; + } + + /** + * Sets attachment. + * + * @param attachment + */ + @JsonProperty("attachment") + public void setAttachment(ResourcesAttachment attachment) { + this.attachment = attachment; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesDocumentRequirementSpec resourcesDocumentRequirementSpec = (ResourcesDocumentRequirementSpec) o; + return Objects.equals(this.key, resourcesDocumentRequirementSpec.key) + && Objects.equals(this.name, resourcesDocumentRequirementSpec.name) + && Objects.equals(this.description, resourcesDocumentRequirementSpec.description) + && Objects.equals(this.required, resourcesDocumentRequirementSpec.required) + && Objects.equals( + this.multipleValuesSupported, resourcesDocumentRequirementSpec.multipleValuesSupported) + && Objects.equals(this.category, resourcesDocumentRequirementSpec.category) + && Objects.equals(this.attachment, resourcesDocumentRequirementSpec.attachment) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + key, name, description, required, multipleValuesSupported, category, attachment, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesDocumentRequirementSpec {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" required: ") + .append(toIndentedString(required)) + .append(newLine) + .append(" multipleValuesSupported: ") + .append(toIndentedString(multipleValuesSupported)) + .append(newLine) + .append(" category: ") + .append(toIndentedString(category)) + .append(newLine) + .append(" attachment: ") + .append(toIndentedString(attachment)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesDocumentType.java b/src/main/java/com/infobip/model/ResourcesDocumentType.java new file mode 100644 index 0000000..e93cb91 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesDocumentType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of document. + */ +public enum ResourcesDocumentType { + TEMPLATE("TEMPLATE"), + SAMPLE("SAMPLE"); + + private final String value; + + ResourcesDocumentType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesDocumentType fromValue(String value) { + for (ResourcesDocumentType enumElement : ResourcesDocumentType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesEmailDomainMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesEmailDomainMoActionDocs.java new file mode 100644 index 0000000..e7dc0ca --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesEmailDomainMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesEmailDomainMoHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesEmailDomainMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesEmailDomainMoActionDocs} instance. + */ + public ResourcesEmailDomainMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesEmailDomainMoActionDocs resourcesEmailDomainMoActionDocs = (ResourcesEmailDomainMoActionDocs) o; + return Objects.equals(this.type, resourcesEmailDomainMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesEmailDomainMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesEmailDomainMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesEmailDomainMoConfigurationRequest.java new file mode 100644 index 0000000..0d7dd3c --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesEmailDomainMoConfigurationRequest.java @@ -0,0 +1,232 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesEmailDomainMoConfigurationRequest model. + */ +public class ResourcesEmailDomainMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private String resource; + + private ResourcesEmailDomainMoActionDocs forwarding; + + private ResourcesPlatformDocs platform; + + /** + * Constructs a new {@link ResourcesEmailDomainMoConfigurationRequest} instance. + */ + public ResourcesEmailDomainMoConfigurationRequest() { + super("EMAIL"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesEmailDomainMoConfigurationRequest instance}. + */ + public ResourcesEmailDomainMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesEmailDomainMoConfigurationRequest instance}. + */ + public ResourcesEmailDomainMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesEmailDomainMoConfigurationRequest instance}. + */ + public ResourcesEmailDomainMoConfigurationRequest forwarding(ResourcesEmailDomainMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesEmailDomainMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesEmailDomainMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesEmailDomainMoConfigurationRequest instance}. + */ + public ResourcesEmailDomainMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesEmailDomainMoConfigurationRequest resourcesEmailDomainMoConfigurationRequest = + (ResourcesEmailDomainMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesEmailDomainMoConfigurationRequest.resourceKey) + && Objects.equals(this.resource, resourcesEmailDomainMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesEmailDomainMoConfigurationRequest.forwarding) + && Objects.equals(this.platform, resourcesEmailDomainMoConfigurationRequest.platform) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, resource, forwarding, platform, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesEmailDomainMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesEmailDomainMoHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesEmailDomainMoHttpForwardDocs.java new file mode 100644 index 0000000..a2f8ece --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesEmailDomainMoHttpForwardDocs.java @@ -0,0 +1,164 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesEmailDomainMoHttpForwardDocs model. + */ +public class ResourcesEmailDomainMoHttpForwardDocs extends ResourcesEmailDomainMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesEmailDomainMoHttpForwardDocs} instance. + */ + public ResourcesEmailDomainMoHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesEmailDomainMoHttpForwardDocs instance}. + */ + public ResourcesEmailDomainMoHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesEmailDomainMoHttpForwardDocs instance}. + */ + public ResourcesEmailDomainMoHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesEmailDomainMoHttpForwardDocs resourcesEmailDomainMoHttpForwardDocs = + (ResourcesEmailDomainMoHttpForwardDocs) o; + return Objects.equals(this.url, resourcesEmailDomainMoHttpForwardDocs.url) + && Objects.equals(this.format, resourcesEmailDomainMoHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesEmailDomainMoHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesEmailRequirementSpec.java b/src/main/java/com/infobip/model/ResourcesEmailRequirementSpec.java new file mode 100644 index 0000000..20b3b40 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesEmailRequirementSpec.java @@ -0,0 +1,332 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesEmailRequirementSpec model. + */ +public class ResourcesEmailRequirementSpec extends ResourcesRequirementSpec { + + private String key; + + private String name; + + private String description; + + private Boolean required; + + private Boolean multipleValuesSupported; + + private ResourcesCategory category; + + /** + * Constructs a new {@link ResourcesEmailRequirementSpec} instance. + */ + public ResourcesEmailRequirementSpec() { + super("EMAIL"); + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + * @return This {@link ResourcesEmailRequirementSpec instance}. + */ + public ResourcesEmailRequirementSpec key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * Key of the requirement. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + * @return This {@link ResourcesEmailRequirementSpec instance}. + */ + public ResourcesEmailRequirementSpec name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * Name of the requirement. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + * @return This {@link ResourcesEmailRequirementSpec instance}. + */ + public ResourcesEmailRequirementSpec description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Description of the requirement. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + * @return This {@link ResourcesEmailRequirementSpec instance}. + */ + public ResourcesEmailRequirementSpec required(Boolean required) { + this.required = required; + return this; + } + + /** + * Returns required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @return required + */ + @JsonProperty("required") + public Boolean getRequired() { + return required; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + */ + @JsonProperty("required") + public void setRequired(Boolean required) { + this.required = required; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + * @return This {@link ResourcesEmailRequirementSpec instance}. + */ + public ResourcesEmailRequirementSpec multipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + return this; + } + + /** + * Returns multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @return multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public Boolean getMultipleValuesSupported() { + return multipleValuesSupported; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public void setMultipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + } + + /** + * Sets category. + * + * @param category + * @return This {@link ResourcesEmailRequirementSpec instance}. + */ + public ResourcesEmailRequirementSpec category(ResourcesCategory category) { + this.category = category; + return this; + } + + /** + * Returns category. + * + * @return category + */ + @JsonProperty("category") + public ResourcesCategory getCategory() { + return category; + } + + /** + * Sets category. + * + * @param category + */ + @JsonProperty("category") + public void setCategory(ResourcesCategory category) { + this.category = category; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesEmailRequirementSpec resourcesEmailRequirementSpec = (ResourcesEmailRequirementSpec) o; + return Objects.equals(this.key, resourcesEmailRequirementSpec.key) + && Objects.equals(this.name, resourcesEmailRequirementSpec.name) + && Objects.equals(this.description, resourcesEmailRequirementSpec.description) + && Objects.equals(this.required, resourcesEmailRequirementSpec.required) + && Objects.equals(this.multipleValuesSupported, resourcesEmailRequirementSpec.multipleValuesSupported) + && Objects.equals(this.category, resourcesEmailRequirementSpec.category) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(key, name, description, required, multipleValuesSupported, category, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesEmailRequirementSpec {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" required: ") + .append(toIndentedString(required)) + .append(newLine) + .append(" multipleValuesSupported: ") + .append(toIndentedString(multipleValuesSupported)) + .append(newLine) + .append(" category: ") + .append(toIndentedString(category)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesFacebookCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesFacebookCoverageInfo.java new file mode 100644 index 0000000..5231ab8 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesFacebookCoverageInfo.java @@ -0,0 +1,328 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the sender coverage. + */ +public class ResourcesFacebookCoverageInfo implements ResourcesIbResourceCoverageInfo { + + private String resource; + + private String displayName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesFacebookCoverageInfo instance}. + */ + public ResourcesFacebookCoverageInfo resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + * @return This {@link ResourcesFacebookCoverageInfo instance}. + */ + public ResourcesFacebookCoverageInfo displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Returns displayName. + *

+ * Field description: + * Display name. + * + * @return displayName + */ + @JsonProperty("displayName") + public String getDisplayName() { + return displayName; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + */ + @JsonProperty("displayName") + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesFacebookCoverageInfo instance}. + */ + public ResourcesFacebookCoverageInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesFacebookCoverageInfo instance}. + */ + public ResourcesFacebookCoverageInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + * + * @param capabilities + * @return This {@link ResourcesFacebookCoverageInfo instance}. + */ + public ResourcesFacebookCoverageInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesFacebookCoverageInfo instance}. + */ + public ResourcesFacebookCoverageInfo addCapabilitiesItem(ResourcesIbResourceCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesFacebookCoverageInfo instance}. + */ + public ResourcesFacebookCoverageInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesFacebookCoverageInfo resourcesFacebookCoverageInfo = (ResourcesFacebookCoverageInfo) o; + return Objects.equals(this.resource, resourcesFacebookCoverageInfo.resource) + && Objects.equals(this.displayName, resourcesFacebookCoverageInfo.displayName) + && Objects.equals(this.countryCode, resourcesFacebookCoverageInfo.countryCode) + && Objects.equals(this.countryName, resourcesFacebookCoverageInfo.countryName) + && Objects.equals(this.capabilities, resourcesFacebookCoverageInfo.capabilities) + && Objects.equals(this.resourceType, resourcesFacebookCoverageInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resource, displayName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesFacebookCoverageInfo {") + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" displayName: ") + .append(toIndentedString(displayName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesFeedbackCode.java b/src/main/java/com/infobip/model/ResourcesFeedbackCode.java new file mode 100644 index 0000000..408201e --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesFeedbackCode.java @@ -0,0 +1,50 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Code of the feedback. + */ +public enum ResourcesFeedbackCode { + REQUIRED("RES_REQ_FEED_REQUIRED"), + FORMAT("RES_REQ_FEED_FORMAT"), + LENGTH_OOR("RES_REQ_FEED_LENGTH_OOR"), + VALUE_OOR("RES_REQ_FEED_VALUE_OOR"), + OTHER("RES_REQ_FEED_OTHER"); + + private final String value; + + ResourcesFeedbackCode(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesFeedbackCode fromValue(String value) { + for (ResourcesFeedbackCode enumElement : ResourcesFeedbackCode.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesFieldType.java b/src/main/java/com/infobip/model/ResourcesFieldType.java new file mode 100644 index 0000000..e9e39c9 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesFieldType.java @@ -0,0 +1,51 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of the requirement. + */ +public enum ResourcesFieldType { + TEXT("TEXT"), + INTEGER("INTEGER"), + EMAIL("EMAIL"), + URL("URL"), + GSM("GSM"), + DOCUMENT("DOCUMENT"); + + private final String value; + + ResourcesFieldType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesFieldType fromValue(String value) { + for (ResourcesFieldType enumElement : ResourcesFieldType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesFilledRequirement.java b/src/main/java/com/infobip/model/ResourcesFilledRequirement.java new file mode 100644 index 0000000..073f5af --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesFilledRequirement.java @@ -0,0 +1,158 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * List of requirements for the resource. + */ +public class ResourcesFilledRequirement { + + private String key; + + private Object value; + + /** + * Sets key. + *

+ * Field description: + * The key of the requirement. + *

+ * The field is required. + * + * @param key + * @return This {@link ResourcesFilledRequirement instance}. + */ + public ResourcesFilledRequirement key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * The key of the requirement. + *

+ * The field is required. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * The key of the requirement. + *

+ * The field is required. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets value. + *

+ * Field description: + * The value of the requirement. Can be a string, integer, or a list of strings and integers. + *

+ * The field is required. + * + * @param value + * @return This {@link ResourcesFilledRequirement instance}. + */ + public ResourcesFilledRequirement value(Object value) { + this.value = value; + return this; + } + + /** + * Returns value. + *

+ * Field description: + * The value of the requirement. Can be a string, integer, or a list of strings and integers. + *

+ * The field is required. + * + * @return value + */ + @JsonProperty("value") + public Object getValue() { + return value; + } + + /** + * Sets value. + *

+ * Field description: + * The value of the requirement. Can be a string, integer, or a list of strings and integers. + *

+ * The field is required. + * + * @param value + */ + @JsonProperty("value") + public void setValue(Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesFilledRequirement resourcesFilledRequirement = (ResourcesFilledRequirement) o; + return Objects.equals(this.key, resourcesFilledRequirement.key) + && Objects.equals(this.value, resourcesFilledRequirement.value); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesFilledRequirement {") + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" value: ") + .append(toIndentedString(value)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesFilledRequirementFeedback.java b/src/main/java/com/infobip/model/ResourcesFilledRequirementFeedback.java new file mode 100644 index 0000000..390d8c3 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesFilledRequirementFeedback.java @@ -0,0 +1,183 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * List of feedback for requirements. + */ +public class ResourcesFilledRequirementFeedback { + + private String key; + + private ResourcesFeedbackCode code; + + private String feedback; + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement for which feedback is provided. + * + * @param key + * @return This {@link ResourcesFilledRequirementFeedback instance}. + */ + public ResourcesFilledRequirementFeedback key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * Key of the requirement for which feedback is provided. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement for which feedback is provided. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets code. + * + * @param code + * @return This {@link ResourcesFilledRequirementFeedback instance}. + */ + public ResourcesFilledRequirementFeedback code(ResourcesFeedbackCode code) { + this.code = code; + return this; + } + + /** + * Returns code. + * + * @return code + */ + @JsonProperty("code") + public ResourcesFeedbackCode getCode() { + return code; + } + + /** + * Sets code. + * + * @param code + */ + @JsonProperty("code") + public void setCode(ResourcesFeedbackCode code) { + this.code = code; + } + + /** + * Sets feedback. + *

+ * Field description: + * Feedback for the requirement. + * + * @param feedback + * @return This {@link ResourcesFilledRequirementFeedback instance}. + */ + public ResourcesFilledRequirementFeedback feedback(String feedback) { + this.feedback = feedback; + return this; + } + + /** + * Returns feedback. + *

+ * Field description: + * Feedback for the requirement. + * + * @return feedback + */ + @JsonProperty("feedback") + public String getFeedback() { + return feedback; + } + + /** + * Sets feedback. + *

+ * Field description: + * Feedback for the requirement. + * + * @param feedback + */ + @JsonProperty("feedback") + public void setFeedback(String feedback) { + this.feedback = feedback; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesFilledRequirementFeedback resourcesFilledRequirementFeedback = (ResourcesFilledRequirementFeedback) o; + return Objects.equals(this.key, resourcesFilledRequirementFeedback.key) + && Objects.equals(this.code, resourcesFilledRequirementFeedback.code) + && Objects.equals(this.feedback, resourcesFilledRequirementFeedback.feedback); + } + + @Override + public int hashCode() { + return Objects.hash(key, code, feedback); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesFilledRequirementFeedback {") + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" code: ") + .append(toIndentedString(code)) + .append(newLine) + .append(" feedback: ") + .append(toIndentedString(feedback)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesFilledRequirementFeedbackApiDoc.java b/src/main/java/com/infobip/model/ResourcesFilledRequirementFeedbackApiDoc.java new file mode 100644 index 0000000..b8e72ad --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesFilledRequirementFeedbackApiDoc.java @@ -0,0 +1,184 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + */ +public class ResourcesFilledRequirementFeedbackApiDoc { + + private String key; + + private ResourcesFeedbackCode code; + + private String feedback; + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement for which feedback is provided. + * + * @param key + * @return This {@link ResourcesFilledRequirementFeedbackApiDoc instance}. + */ + public ResourcesFilledRequirementFeedbackApiDoc key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * Key of the requirement for which feedback is provided. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement for which feedback is provided. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets code. + * + * @param code + * @return This {@link ResourcesFilledRequirementFeedbackApiDoc instance}. + */ + public ResourcesFilledRequirementFeedbackApiDoc code(ResourcesFeedbackCode code) { + this.code = code; + return this; + } + + /** + * Returns code. + * + * @return code + */ + @JsonProperty("code") + public ResourcesFeedbackCode getCode() { + return code; + } + + /** + * Sets code. + * + * @param code + */ + @JsonProperty("code") + public void setCode(ResourcesFeedbackCode code) { + this.code = code; + } + + /** + * Sets feedback. + *

+ * Field description: + * Feedback for the requirement. + * + * @param feedback + * @return This {@link ResourcesFilledRequirementFeedbackApiDoc instance}. + */ + public ResourcesFilledRequirementFeedbackApiDoc feedback(String feedback) { + this.feedback = feedback; + return this; + } + + /** + * Returns feedback. + *

+ * Field description: + * Feedback for the requirement. + * + * @return feedback + */ + @JsonProperty("feedback") + public String getFeedback() { + return feedback; + } + + /** + * Sets feedback. + *

+ * Field description: + * Feedback for the requirement. + * + * @param feedback + */ + @JsonProperty("feedback") + public void setFeedback(String feedback) { + this.feedback = feedback; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesFilledRequirementFeedbackApiDoc resourcesFilledRequirementFeedbackApiDoc = + (ResourcesFilledRequirementFeedbackApiDoc) o; + return Objects.equals(this.key, resourcesFilledRequirementFeedbackApiDoc.key) + && Objects.equals(this.code, resourcesFilledRequirementFeedbackApiDoc.code) + && Objects.equals(this.feedback, resourcesFilledRequirementFeedbackApiDoc.feedback); + } + + @Override + public int hashCode() { + return Objects.hash(key, code, feedback); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesFilledRequirementFeedbackApiDoc {") + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" code: ") + .append(toIndentedString(code)) + .append(newLine) + .append(" feedback: ") + .append(toIndentedString(feedback)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesGsmRequirementSpec.java b/src/main/java/com/infobip/model/ResourcesGsmRequirementSpec.java new file mode 100644 index 0000000..ca20006 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesGsmRequirementSpec.java @@ -0,0 +1,332 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesGsmRequirementSpec model. + */ +public class ResourcesGsmRequirementSpec extends ResourcesRequirementSpec { + + private String key; + + private String name; + + private String description; + + private Boolean required; + + private Boolean multipleValuesSupported; + + private ResourcesCategory category; + + /** + * Constructs a new {@link ResourcesGsmRequirementSpec} instance. + */ + public ResourcesGsmRequirementSpec() { + super("GSM"); + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + * @return This {@link ResourcesGsmRequirementSpec instance}. + */ + public ResourcesGsmRequirementSpec key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * Key of the requirement. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + * @return This {@link ResourcesGsmRequirementSpec instance}. + */ + public ResourcesGsmRequirementSpec name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * Name of the requirement. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + * @return This {@link ResourcesGsmRequirementSpec instance}. + */ + public ResourcesGsmRequirementSpec description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Description of the requirement. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + * @return This {@link ResourcesGsmRequirementSpec instance}. + */ + public ResourcesGsmRequirementSpec required(Boolean required) { + this.required = required; + return this; + } + + /** + * Returns required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @return required + */ + @JsonProperty("required") + public Boolean getRequired() { + return required; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + */ + @JsonProperty("required") + public void setRequired(Boolean required) { + this.required = required; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + * @return This {@link ResourcesGsmRequirementSpec instance}. + */ + public ResourcesGsmRequirementSpec multipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + return this; + } + + /** + * Returns multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @return multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public Boolean getMultipleValuesSupported() { + return multipleValuesSupported; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public void setMultipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + } + + /** + * Sets category. + * + * @param category + * @return This {@link ResourcesGsmRequirementSpec instance}. + */ + public ResourcesGsmRequirementSpec category(ResourcesCategory category) { + this.category = category; + return this; + } + + /** + * Returns category. + * + * @return category + */ + @JsonProperty("category") + public ResourcesCategory getCategory() { + return category; + } + + /** + * Sets category. + * + * @param category + */ + @JsonProperty("category") + public void setCategory(ResourcesCategory category) { + this.category = category; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesGsmRequirementSpec resourcesGsmRequirementSpec = (ResourcesGsmRequirementSpec) o; + return Objects.equals(this.key, resourcesGsmRequirementSpec.key) + && Objects.equals(this.name, resourcesGsmRequirementSpec.name) + && Objects.equals(this.description, resourcesGsmRequirementSpec.description) + && Objects.equals(this.required, resourcesGsmRequirementSpec.required) + && Objects.equals(this.multipleValuesSupported, resourcesGsmRequirementSpec.multipleValuesSupported) + && Objects.equals(this.category, resourcesGsmRequirementSpec.category) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(key, name, description, required, multipleValuesSupported, category, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesGsmRequirementSpec {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" required: ") + .append(toIndentedString(required)) + .append(newLine) + .append(" multipleValuesSupported: ") + .append(toIndentedString(multipleValuesSupported)) + .append(newLine) + .append(" category: ") + .append(toIndentedString(category)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesHttpForwardActionDocs.java b/src/main/java/com/infobip/model/ResourcesHttpForwardActionDocs.java new file mode 100644 index 0000000..1821988 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesHttpForwardActionDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Used for HTTP push. MO message parameters can be pushed to specified URL in defined format. + */ +public class ResourcesHttpForwardActionDocs extends ResourcesMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesHttpForwardActionDocs} instance. + */ + public ResourcesHttpForwardActionDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesHttpForwardActionDocs instance}. + */ + public ResourcesHttpForwardActionDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesHttpForwardActionDocs instance}. + */ + public ResourcesHttpForwardActionDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesHttpForwardActionDocs resourcesHttpForwardActionDocs = (ResourcesHttpForwardActionDocs) o; + return Objects.equals(this.url, resourcesHttpForwardActionDocs.url) + && Objects.equals(this.format, resourcesHttpForwardActionDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesHttpForwardActionDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesIbResourceCapability.java b/src/main/java/com/infobip/model/ResourcesIbResourceCapability.java new file mode 100644 index 0000000..76acdde --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIbResourceCapability.java @@ -0,0 +1,128 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Coverage by capability. + */ +public class ResourcesIbResourceCapability { + + private ResourcesResourceCapabilityChannel channel; + + private ResourcesIbResourceCoverage coverage; + + /** + * Sets channel. + * + * @param channel + * @return This {@link ResourcesIbResourceCapability instance}. + */ + public ResourcesIbResourceCapability channel(ResourcesResourceCapabilityChannel channel) { + this.channel = channel; + return this; + } + + /** + * Returns channel. + * + * @return channel + */ + @JsonProperty("channel") + public ResourcesResourceCapabilityChannel getChannel() { + return channel; + } + + /** + * Sets channel. + * + * @param channel + */ + @JsonProperty("channel") + public void setChannel(ResourcesResourceCapabilityChannel channel) { + this.channel = channel; + } + + /** + * Sets coverage. + * + * @param coverage + * @return This {@link ResourcesIbResourceCapability instance}. + */ + public ResourcesIbResourceCapability coverage(ResourcesIbResourceCoverage coverage) { + this.coverage = coverage; + return this; + } + + /** + * Returns coverage. + * + * @return coverage + */ + @JsonProperty("coverage") + public ResourcesIbResourceCoverage getCoverage() { + return coverage; + } + + /** + * Sets coverage. + * + * @param coverage + */ + @JsonProperty("coverage") + public void setCoverage(ResourcesIbResourceCoverage coverage) { + this.coverage = coverage; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesIbResourceCapability resourcesIbResourceCapability = (ResourcesIbResourceCapability) o; + return Objects.equals(this.channel, resourcesIbResourceCapability.channel) + && Objects.equals(this.coverage, resourcesIbResourceCapability.coverage); + } + + @Override + public int hashCode() { + return Objects.hash(channel, coverage); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesIbResourceCapability {") + .append(newLine) + .append(" channel: ") + .append(toIndentedString(channel)) + .append(newLine) + .append(" coverage: ") + .append(toIndentedString(coverage)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesIbResourceCoverage.java b/src/main/java/com/infobip/model/ResourcesIbResourceCoverage.java new file mode 100644 index 0000000..3b62327 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIbResourceCoverage.java @@ -0,0 +1,153 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the networks configured for the resource. + */ +public class ResourcesIbResourceCoverage { + + private Set outbound = null; + + private Boolean inbound; + + /** + * Sets outbound. + * + * @param outbound + * @return This {@link ResourcesIbResourceCoverage instance}. + */ + public ResourcesIbResourceCoverage outbound(Set outbound) { + this.outbound = outbound; + return this; + } + + /** + * Adds and item into outbound. + * + * @param outboundItem The item to be added to the list. + * @return This {@link ResourcesIbResourceCoverage instance}. + */ + public ResourcesIbResourceCoverage addOutboundItem(ResourcesNetworkView outboundItem) { + if (this.outbound == null) { + this.outbound = new LinkedHashSet<>(); + } + this.outbound.add(outboundItem); + return this; + } + + /** + * Returns outbound. + * + * @return outbound + */ + @JsonProperty("outbound") + public Set getOutbound() { + return outbound; + } + + /** + * Sets outbound. + * + * @param outbound + */ + @JsonProperty("outbound") + public void setOutbound(Set outbound) { + this.outbound = outbound; + } + + /** + * Sets inbound. + *

+ * Field description: + * Indicates if inbound configuration exists. + * + * @param inbound + * @return This {@link ResourcesIbResourceCoverage instance}. + */ + public ResourcesIbResourceCoverage inbound(Boolean inbound) { + this.inbound = inbound; + return this; + } + + /** + * Returns inbound. + *

+ * Field description: + * Indicates if inbound configuration exists. + * + * @return inbound + */ + @JsonProperty("inbound") + public Boolean getInbound() { + return inbound; + } + + /** + * Sets inbound. + *

+ * Field description: + * Indicates if inbound configuration exists. + * + * @param inbound + */ + @JsonProperty("inbound") + public void setInbound(Boolean inbound) { + this.inbound = inbound; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesIbResourceCoverage resourcesIbResourceCoverage = (ResourcesIbResourceCoverage) o; + return Objects.equals(this.outbound, resourcesIbResourceCoverage.outbound) + && Objects.equals(this.inbound, resourcesIbResourceCoverage.inbound); + } + + @Override + public int hashCode() { + return Objects.hash(outbound, inbound); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesIbResourceCoverage {") + .append(newLine) + .append(" outbound: ") + .append(toIndentedString(outbound)) + .append(newLine) + .append(" inbound: ") + .append(toIndentedString(inbound)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesIbResourceCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesIbResourceCoverageInfo.java new file mode 100644 index 0000000..6a26d0a --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIbResourceCoverageInfo.java @@ -0,0 +1,32 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "resourceType", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaCoverageInfo.class, name = "ALPHANUMERIC"), + @JsonSubTypes.Type(value = ResourcesAppleCoverageInfo.class, name = "APPLE_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesFacebookCoverageInfo.class, name = "FACEBOOK_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesKakaoCoverageInfo.class, name = "KAKAO_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesNumberCoverageInfo.class, name = "NUMBER"), + @JsonSubTypes.Type(value = ResourcesOpenChannelCoverageInfo.class, name = "OPEN_CHANNEL_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesRcsCoverageInfo.class, name = "RCS_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesViberCoverageInfo.class, name = "VIBER_RESOURCE") +}) +public interface ResourcesIbResourceCoverageInfo { + public ResourcesIbResourceType getResourceType(); +} diff --git a/src/main/java/com/infobip/model/ResourcesIbResourceCoverageKey.java b/src/main/java/com/infobip/model/ResourcesIbResourceCoverageKey.java new file mode 100644 index 0000000..5533156 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIbResourceCoverageKey.java @@ -0,0 +1,94 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Represents ResourcesIbResourceCoverageKey model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "resourceType", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaCoverageKey.class, name = "ALPHANUMERIC"), + @JsonSubTypes.Type(value = ResourcesAppleCoverageKey.class, name = "APPLE_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesNumberCoverageKey.class, name = "NUMBER"), + @JsonSubTypes.Type(value = ResourcesOpenChannelCoverageKey.class, name = "OPEN_CHANNEL_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesRcsCoverageKey.class, name = "RCS_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesViberCoverageKey.class, name = "VIBER_RESOURCE"), +}) +public abstract class ResourcesIbResourceCoverageKey { + + protected final ResourcesIbResourceType resourceType; + + /** + * Constructs a new {@link ResourcesIbResourceCoverageKey} instance. + */ + public ResourcesIbResourceCoverageKey(String resourceType) { + this.resourceType = ResourcesIbResourceType.fromValue(resourceType); + } + + /** + * Returns resourceType. + *

+ * The field is required. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesIbResourceCoverageKey resourcesIbResourceCoverageKey = (ResourcesIbResourceCoverageKey) o; + return Objects.equals(this.resourceType, resourcesIbResourceCoverageKey.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesIbResourceCoverageKey {") + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesIbResourceInfo.java b/src/main/java/com/infobip/model/ResourcesIbResourceInfo.java new file mode 100644 index 0000000..014f379 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIbResourceInfo.java @@ -0,0 +1,30 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "resourceType", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaResourceInfo.class, name = "ALPHANUMERIC"), + @JsonSubTypes.Type(value = ResourcesAppleResourceInfo.class, name = "APPLE_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesNumberResourceInfo.class, name = "NUMBER"), + @JsonSubTypes.Type(value = ResourcesOpenChannelResourceInfo.class, name = "OPEN_CHANNEL_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesRcsResourceInfo.class, name = "RCS_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesViberResourceInfo.class, name = "VIBER_RESOURCE") +}) +public interface ResourcesIbResourceInfo { + public ResourcesIbResourceType getResourceType(); +} diff --git a/src/main/java/com/infobip/model/ResourcesIbResourceType.java b/src/main/java/com/infobip/model/ResourcesIbResourceType.java new file mode 100644 index 0000000..94dc200 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIbResourceType.java @@ -0,0 +1,53 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Resource type. + */ +public enum ResourcesIbResourceType { + ALPHANUMERIC("ALPHANUMERIC"), + NUMBER("NUMBER"), + RCS_RESOURCE("RCS_RESOURCE"), + VIBER_RESOURCE("VIBER_RESOURCE"), + APPLE_RESOURCE("APPLE_RESOURCE"), + OPEN_CHANNEL_RESOURCE("OPEN_CHANNEL_RESOURCE"), + KAKAO_RESOURCE("KAKAO_RESOURCE"), + FACEBOOK_RESOURCE("FACEBOOK_RESOURCE"); + + private final String value; + + ResourcesIbResourceType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesIbResourceType fromValue(String value) { + for (ResourcesIbResourceType enumElement : ResourcesIbResourceType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesIbResourcesFilter.java b/src/main/java/com/infobip/model/ResourcesIbResourcesFilter.java new file mode 100644 index 0000000..6236dbb --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIbResourcesFilter.java @@ -0,0 +1,94 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Filter for resources. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "resourceType", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaResourceFilter.class, name = "ALPHANUMERIC"), + @JsonSubTypes.Type(value = ResourcesAppleResourceFilter.class, name = "APPLE_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesNumberResourceFilter.class, name = "NUMBER"), + @JsonSubTypes.Type(value = ResourcesOpenChannelResourceFilter.class, name = "OPEN_CHANNEL_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesRcsResourceFilter.class, name = "RCS_RESOURCE"), + @JsonSubTypes.Type(value = ResourcesViberResourceFilter.class, name = "VIBER_RESOURCE"), +}) +public abstract class ResourcesIbResourcesFilter { + + protected final ResourcesIbResourceType resourceType; + + /** + * Constructs a new {@link ResourcesIbResourcesFilter} instance. + */ + public ResourcesIbResourcesFilter(String resourceType) { + this.resourceType = ResourcesIbResourceType.fromValue(resourceType); + } + + /** + * Returns resourceType. + *

+ * The field is required. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesIbResourcesFilter resourcesIbResourcesFilter = (ResourcesIbResourcesFilter) o; + return Objects.equals(this.resourceType, resourcesIbResourcesFilter.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesIbResourcesFilter {") + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesIbResourcesResponse.java b/src/main/java/com/infobip/model/ResourcesIbResourcesResponse.java new file mode 100644 index 0000000..ffba521 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIbResourcesResponse.java @@ -0,0 +1,156 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Response containing information about IB resources. + */ +public class ResourcesIbResourcesResponse { + + private List results = null; + + private PageInfo paging; + + /** + * Sets results. + *

+ * Field description: + * List of resources. + * + * @param results + * @return This {@link ResourcesIbResourcesResponse instance}. + */ + public ResourcesIbResourcesResponse results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * List of resources. + * + * @param resultsItem The item to be added to the list. + * @return This {@link ResourcesIbResourcesResponse instance}. + */ + public ResourcesIbResourcesResponse addResultsItem(ResourcesIbResourceInfo resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * List of resources. + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * List of resources. + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + /** + * Sets paging. + * + * @param paging + * @return This {@link ResourcesIbResourcesResponse instance}. + */ + public ResourcesIbResourcesResponse paging(PageInfo paging) { + this.paging = paging; + return this; + } + + /** + * Returns paging. + * + * @return paging + */ + @JsonProperty("paging") + public PageInfo getPaging() { + return paging; + } + + /** + * Sets paging. + * + * @param paging + */ + @JsonProperty("paging") + public void setPaging(PageInfo paging) { + this.paging = paging; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesIbResourcesResponse resourcesIbResourcesResponse = (ResourcesIbResourcesResponse) o; + return Objects.equals(this.results, resourcesIbResourcesResponse.results) + && Objects.equals(this.paging, resourcesIbResourcesResponse.paging); + } + + @Override + public int hashCode() { + return Objects.hash(results, paging); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesIbResourcesResponse {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append(" paging: ") + .append(toIndentedString(paging)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesInstagramDmHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesInstagramDmHttpForwardDocs.java new file mode 100644 index 0000000..453f0fc --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesInstagramDmHttpForwardDocs.java @@ -0,0 +1,164 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesInstagramDmHttpForwardDocs model. + */ +public class ResourcesInstagramDmHttpForwardDocs extends ResourcesInstagramDmMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesInstagramDmHttpForwardDocs} instance. + */ + public ResourcesInstagramDmHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesInstagramDmHttpForwardDocs instance}. + */ + public ResourcesInstagramDmHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesInstagramDmHttpForwardDocs instance}. + */ + public ResourcesInstagramDmHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesInstagramDmHttpForwardDocs resourcesInstagramDmHttpForwardDocs = + (ResourcesInstagramDmHttpForwardDocs) o; + return Objects.equals(this.url, resourcesInstagramDmHttpForwardDocs.url) + && Objects.equals(this.format, resourcesInstagramDmHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesInstagramDmHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesInstagramDmMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesInstagramDmMoActionDocs.java new file mode 100644 index 0000000..452e591 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesInstagramDmMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesInstagramDmHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesInstagramDmMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesInstagramDmMoActionDocs} instance. + */ + public ResourcesInstagramDmMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesInstagramDmMoActionDocs resourcesInstagramDmMoActionDocs = (ResourcesInstagramDmMoActionDocs) o; + return Objects.equals(this.type, resourcesInstagramDmMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesInstagramDmMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesInstagramDmMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesInstagramDmMoConfigurationRequest.java new file mode 100644 index 0000000..dfd59ef --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesInstagramDmMoConfigurationRequest.java @@ -0,0 +1,269 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesInstagramDmMoConfigurationRequest model. + */ +public class ResourcesInstagramDmMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private ResourcesPlatformDocs platform; + + private String resource; + + private ResourcesInstagramDmMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + /** + * Constructs a new {@link ResourcesInstagramDmMoConfigurationRequest} instance. + */ + public ResourcesInstagramDmMoConfigurationRequest() { + super("INSTAGRAM_DM"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesInstagramDmMoConfigurationRequest instance}. + */ + public ResourcesInstagramDmMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesInstagramDmMoConfigurationRequest instance}. + */ + public ResourcesInstagramDmMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesInstagramDmMoConfigurationRequest instance}. + */ + public ResourcesInstagramDmMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesInstagramDmMoConfigurationRequest instance}. + */ + public ResourcesInstagramDmMoConfigurationRequest forwarding(ResourcesInstagramDmMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesInstagramDmMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesInstagramDmMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesInstagramDmMoConfigurationRequest instance}. + */ + public ResourcesInstagramDmMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesInstagramDmMoConfigurationRequest resourcesInstagramDmMoConfigurationRequest = + (ResourcesInstagramDmMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesInstagramDmMoConfigurationRequest.resourceKey) + && Objects.equals(this.platform, resourcesInstagramDmMoConfigurationRequest.platform) + && Objects.equals(this.resource, resourcesInstagramDmMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesInstagramDmMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesInstagramDmMoConfigurationRequest.conversations) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, platform, resource, forwarding, conversations, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesInstagramDmMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesIntegerRequirementSpec.java b/src/main/java/com/infobip/model/ResourcesIntegerRequirementSpec.java new file mode 100644 index 0000000..88ad387 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIntegerRequirementSpec.java @@ -0,0 +1,443 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesIntegerRequirementSpec model. + */ +public class ResourcesIntegerRequirementSpec extends ResourcesRequirementSpec { + + private String key; + + private String name; + + private String description; + + private Boolean required; + + private Boolean multipleValuesSupported; + + private ResourcesCategory category; + + private List options = null; + + private ResourcesIntegerRequirementValidation validation; + + /** + * Constructs a new {@link ResourcesIntegerRequirementSpec} instance. + */ + public ResourcesIntegerRequirementSpec() { + super("INTEGER"); + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * Key of the requirement. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * Name of the requirement. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Description of the requirement. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec required(Boolean required) { + this.required = required; + return this; + } + + /** + * Returns required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @return required + */ + @JsonProperty("required") + public Boolean getRequired() { + return required; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + */ + @JsonProperty("required") + public void setRequired(Boolean required) { + this.required = required; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec multipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + return this; + } + + /** + * Returns multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @return multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public Boolean getMultipleValuesSupported() { + return multipleValuesSupported; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public void setMultipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + } + + /** + * Sets category. + * + * @param category + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec category(ResourcesCategory category) { + this.category = category; + return this; + } + + /** + * Returns category. + * + * @return category + */ + @JsonProperty("category") + public ResourcesCategory getCategory() { + return category; + } + + /** + * Sets category. + * + * @param category + */ + @JsonProperty("category") + public void setCategory(ResourcesCategory category) { + this.category = category; + } + + /** + * Sets options. + *

+ * Field description: + * List of options for the requirement. + * + * @param options + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec options(List options) { + this.options = options; + return this; + } + + /** + * Adds and item into options. + *

+ * Field description: + * List of options for the requirement. + * + * @param optionsItem The item to be added to the list. + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec addOptionsItem(String optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Returns options. + *

+ * Field description: + * List of options for the requirement. + * + * @return options + */ + @JsonProperty("options") + public List getOptions() { + return options; + } + + /** + * Sets options. + *

+ * Field description: + * List of options for the requirement. + * + * @param options + */ + @JsonProperty("options") + public void setOptions(List options) { + this.options = options; + } + + /** + * Sets validation. + * + * @param validation + * @return This {@link ResourcesIntegerRequirementSpec instance}. + */ + public ResourcesIntegerRequirementSpec validation(ResourcesIntegerRequirementValidation validation) { + this.validation = validation; + return this; + } + + /** + * Returns validation. + * + * @return validation + */ + @JsonProperty("validation") + public ResourcesIntegerRequirementValidation getValidation() { + return validation; + } + + /** + * Sets validation. + * + * @param validation + */ + @JsonProperty("validation") + public void setValidation(ResourcesIntegerRequirementValidation validation) { + this.validation = validation; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesIntegerRequirementSpec resourcesIntegerRequirementSpec = (ResourcesIntegerRequirementSpec) o; + return Objects.equals(this.key, resourcesIntegerRequirementSpec.key) + && Objects.equals(this.name, resourcesIntegerRequirementSpec.name) + && Objects.equals(this.description, resourcesIntegerRequirementSpec.description) + && Objects.equals(this.required, resourcesIntegerRequirementSpec.required) + && Objects.equals(this.multipleValuesSupported, resourcesIntegerRequirementSpec.multipleValuesSupported) + && Objects.equals(this.category, resourcesIntegerRequirementSpec.category) + && Objects.equals(this.options, resourcesIntegerRequirementSpec.options) + && Objects.equals(this.validation, resourcesIntegerRequirementSpec.validation) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + name, + description, + required, + multipleValuesSupported, + category, + options, + validation, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesIntegerRequirementSpec {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" required: ") + .append(toIndentedString(required)) + .append(newLine) + .append(" multipleValuesSupported: ") + .append(toIndentedString(multipleValuesSupported)) + .append(newLine) + .append(" category: ") + .append(toIndentedString(category)) + .append(newLine) + .append(" options: ") + .append(toIndentedString(options)) + .append(newLine) + .append(" validation: ") + .append(toIndentedString(validation)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesIntegerRequirementValidation.java b/src/main/java/com/infobip/model/ResourcesIntegerRequirementValidation.java new file mode 100644 index 0000000..295a2a0 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesIntegerRequirementValidation.java @@ -0,0 +1,147 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Validation rules. + */ +public class ResourcesIntegerRequirementValidation { + + private Integer minValue; + + private Integer maxValue; + + /** + * Sets minValue. + *

+ * Field description: + * The minimum value of the integer. + * + * @param minValue + * @return This {@link ResourcesIntegerRequirementValidation instance}. + */ + public ResourcesIntegerRequirementValidation minValue(Integer minValue) { + this.minValue = minValue; + return this; + } + + /** + * Returns minValue. + *

+ * Field description: + * The minimum value of the integer. + * + * @return minValue + */ + @JsonProperty("minValue") + public Integer getMinValue() { + return minValue; + } + + /** + * Sets minValue. + *

+ * Field description: + * The minimum value of the integer. + * + * @param minValue + */ + @JsonProperty("minValue") + public void setMinValue(Integer minValue) { + this.minValue = minValue; + } + + /** + * Sets maxValue. + *

+ * Field description: + * The maximum value of the integer. + * + * @param maxValue + * @return This {@link ResourcesIntegerRequirementValidation instance}. + */ + public ResourcesIntegerRequirementValidation maxValue(Integer maxValue) { + this.maxValue = maxValue; + return this; + } + + /** + * Returns maxValue. + *

+ * Field description: + * The maximum value of the integer. + * + * @return maxValue + */ + @JsonProperty("maxValue") + public Integer getMaxValue() { + return maxValue; + } + + /** + * Sets maxValue. + *

+ * Field description: + * The maximum value of the integer. + * + * @param maxValue + */ + @JsonProperty("maxValue") + public void setMaxValue(Integer maxValue) { + this.maxValue = maxValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesIntegerRequirementValidation resourcesIntegerRequirementValidation = + (ResourcesIntegerRequirementValidation) o; + return Objects.equals(this.minValue, resourcesIntegerRequirementValidation.minValue) + && Objects.equals(this.maxValue, resourcesIntegerRequirementValidation.maxValue); + } + + @Override + public int hashCode() { + return Objects.hash(minValue, maxValue); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesIntegerRequirementValidation {") + .append(newLine) + .append(" minValue: ") + .append(toIndentedString(minValue)) + .append(newLine) + .append(" maxValue: ") + .append(toIndentedString(maxValue)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesKakaoCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesKakaoCoverageInfo.java new file mode 100644 index 0000000..e1e4a20 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesKakaoCoverageInfo.java @@ -0,0 +1,328 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the sender coverage. + */ +public class ResourcesKakaoCoverageInfo implements ResourcesIbResourceCoverageInfo { + + private String resource; + + private String displayName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesKakaoCoverageInfo instance}. + */ + public ResourcesKakaoCoverageInfo resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + * @return This {@link ResourcesKakaoCoverageInfo instance}. + */ + public ResourcesKakaoCoverageInfo displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Returns displayName. + *

+ * Field description: + * Display name. + * + * @return displayName + */ + @JsonProperty("displayName") + public String getDisplayName() { + return displayName; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + */ + @JsonProperty("displayName") + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesKakaoCoverageInfo instance}. + */ + public ResourcesKakaoCoverageInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesKakaoCoverageInfo instance}. + */ + public ResourcesKakaoCoverageInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + * + * @param capabilities + * @return This {@link ResourcesKakaoCoverageInfo instance}. + */ + public ResourcesKakaoCoverageInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesKakaoCoverageInfo instance}. + */ + public ResourcesKakaoCoverageInfo addCapabilitiesItem(ResourcesIbResourceCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesKakaoCoverageInfo instance}. + */ + public ResourcesKakaoCoverageInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesKakaoCoverageInfo resourcesKakaoCoverageInfo = (ResourcesKakaoCoverageInfo) o; + return Objects.equals(this.resource, resourcesKakaoCoverageInfo.resource) + && Objects.equals(this.displayName, resourcesKakaoCoverageInfo.displayName) + && Objects.equals(this.countryCode, resourcesKakaoCoverageInfo.countryCode) + && Objects.equals(this.countryName, resourcesKakaoCoverageInfo.countryName) + && Objects.equals(this.capabilities, resourcesKakaoCoverageInfo.capabilities) + && Objects.equals(this.resourceType, resourcesKakaoCoverageInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resource, displayName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesKakaoCoverageInfo {") + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" displayName: ") + .append(toIndentedString(displayName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesKakaoSangdamHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesKakaoSangdamHttpForwardDocs.java new file mode 100644 index 0000000..b6cb67e --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesKakaoSangdamHttpForwardDocs.java @@ -0,0 +1,164 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesKakaoSangdamHttpForwardDocs model. + */ +public class ResourcesKakaoSangdamHttpForwardDocs extends ResourcesKakaoSangdamMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesKakaoSangdamHttpForwardDocs} instance. + */ + public ResourcesKakaoSangdamHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesKakaoSangdamHttpForwardDocs instance}. + */ + public ResourcesKakaoSangdamHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesKakaoSangdamHttpForwardDocs instance}. + */ + public ResourcesKakaoSangdamHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesKakaoSangdamHttpForwardDocs resourcesKakaoSangdamHttpForwardDocs = + (ResourcesKakaoSangdamHttpForwardDocs) o; + return Objects.equals(this.url, resourcesKakaoSangdamHttpForwardDocs.url) + && Objects.equals(this.format, resourcesKakaoSangdamHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesKakaoSangdamHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesKakaoSangdamMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesKakaoSangdamMoActionDocs.java new file mode 100644 index 0000000..d93f08b --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesKakaoSangdamMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesKakaoSangdamHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesKakaoSangdamMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesKakaoSangdamMoActionDocs} instance. + */ + public ResourcesKakaoSangdamMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesKakaoSangdamMoActionDocs resourcesKakaoSangdamMoActionDocs = (ResourcesKakaoSangdamMoActionDocs) o; + return Objects.equals(this.type, resourcesKakaoSangdamMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesKakaoSangdamMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesKakaoSangdamMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesKakaoSangdamMoConfigurationRequest.java new file mode 100644 index 0000000..001b1f8 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesKakaoSangdamMoConfigurationRequest.java @@ -0,0 +1,269 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesKakaoSangdamMoConfigurationRequest model. + */ +public class ResourcesKakaoSangdamMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private ResourcesPlatformDocs platform; + + private String resource; + + private ResourcesKakaoSangdamMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + /** + * Constructs a new {@link ResourcesKakaoSangdamMoConfigurationRequest} instance. + */ + public ResourcesKakaoSangdamMoConfigurationRequest() { + super("KAKAO_SANGDAM"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesKakaoSangdamMoConfigurationRequest instance}. + */ + public ResourcesKakaoSangdamMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesKakaoSangdamMoConfigurationRequest instance}. + */ + public ResourcesKakaoSangdamMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesKakaoSangdamMoConfigurationRequest instance}. + */ + public ResourcesKakaoSangdamMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesKakaoSangdamMoConfigurationRequest instance}. + */ + public ResourcesKakaoSangdamMoConfigurationRequest forwarding(ResourcesKakaoSangdamMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesKakaoSangdamMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesKakaoSangdamMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesKakaoSangdamMoConfigurationRequest instance}. + */ + public ResourcesKakaoSangdamMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesKakaoSangdamMoConfigurationRequest resourcesKakaoSangdamMoConfigurationRequest = + (ResourcesKakaoSangdamMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesKakaoSangdamMoConfigurationRequest.resourceKey) + && Objects.equals(this.platform, resourcesKakaoSangdamMoConfigurationRequest.platform) + && Objects.equals(this.resource, resourcesKakaoSangdamMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesKakaoSangdamMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesKakaoSangdamMoConfigurationRequest.conversations) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, platform, resource, forwarding, conversations, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesKakaoSangdamMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesLineOaMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesLineOaMoActionDocs.java new file mode 100644 index 0000000..7fbbb91 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesLineOaMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesLineOaMoHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesLineOaMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesLineOaMoActionDocs} instance. + */ + public ResourcesLineOaMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesLineOaMoActionDocs resourcesLineOaMoActionDocs = (ResourcesLineOaMoActionDocs) o; + return Objects.equals(this.type, resourcesLineOaMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesLineOaMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesLineOaMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesLineOaMoConfigurationRequest.java new file mode 100644 index 0000000..89da453 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesLineOaMoConfigurationRequest.java @@ -0,0 +1,232 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesLineOaMoConfigurationRequest model. + */ +public class ResourcesLineOaMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private String resource; + + private ResourcesLineOaMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + /** + * Constructs a new {@link ResourcesLineOaMoConfigurationRequest} instance. + */ + public ResourcesLineOaMoConfigurationRequest() { + super("LINE_OA"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesLineOaMoConfigurationRequest instance}. + */ + public ResourcesLineOaMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesLineOaMoConfigurationRequest instance}. + */ + public ResourcesLineOaMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesLineOaMoConfigurationRequest instance}. + */ + public ResourcesLineOaMoConfigurationRequest forwarding(ResourcesLineOaMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesLineOaMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesLineOaMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesLineOaMoConfigurationRequest instance}. + */ + public ResourcesLineOaMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesLineOaMoConfigurationRequest resourcesLineOaMoConfigurationRequest = + (ResourcesLineOaMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesLineOaMoConfigurationRequest.resourceKey) + && Objects.equals(this.resource, resourcesLineOaMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesLineOaMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesLineOaMoConfigurationRequest.conversations) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, resource, forwarding, conversations, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesLineOaMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesLineOaMoHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesLineOaMoHttpForwardDocs.java new file mode 100644 index 0000000..2632855 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesLineOaMoHttpForwardDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesLineOaMoHttpForwardDocs model. + */ +public class ResourcesLineOaMoHttpForwardDocs extends ResourcesLineOaMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesLineOaMoHttpForwardDocs} instance. + */ + public ResourcesLineOaMoHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesLineOaMoHttpForwardDocs instance}. + */ + public ResourcesLineOaMoHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesLineOaMoHttpForwardDocs instance}. + */ + public ResourcesLineOaMoHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesLineOaMoHttpForwardDocs resourcesLineOaMoHttpForwardDocs = (ResourcesLineOaMoHttpForwardDocs) o; + return Objects.equals(this.url, resourcesLineOaMoHttpForwardDocs.url) + && Objects.equals(this.format, resourcesLineOaMoHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesLineOaMoHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMailForwardActionDocs.java b/src/main/java/com/infobip/model/ResourcesMailForwardActionDocs.java new file mode 100644 index 0000000..307fb3f --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMailForwardActionDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesMailForwardActionDocs model. + */ +public class ResourcesMailForwardActionDocs extends ResourcesMoActionDocs { + + private String mail; + + private String description; + + /** + * Constructs a new {@link ResourcesMailForwardActionDocs} instance. + */ + public ResourcesMailForwardActionDocs() { + super("MAIL_FORWARD"); + } + + /** + * Sets mail. + *

+ * Field description: + * Specifies e-mail destination. + *

+ * The field is required. + * + * @param mail + * @return This {@link ResourcesMailForwardActionDocs instance}. + */ + public ResourcesMailForwardActionDocs mail(String mail) { + this.mail = mail; + return this; + } + + /** + * Returns mail. + *

+ * Field description: + * Specifies e-mail destination. + *

+ * The field is required. + * + * @return mail + */ + @JsonProperty("mail") + public String getMail() { + return mail; + } + + /** + * Sets mail. + *

+ * Field description: + * Specifies e-mail destination. + *

+ * The field is required. + * + * @param mail + */ + @JsonProperty("mail") + public void setMail(String mail) { + this.mail = mail; + } + + /** + * Sets description. + *

+ * Field description: + * Additional action description. + * + * @param description + * @return This {@link ResourcesMailForwardActionDocs instance}. + */ + public ResourcesMailForwardActionDocs description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Additional action description. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Additional action description. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMailForwardActionDocs resourcesMailForwardActionDocs = (ResourcesMailForwardActionDocs) o; + return Objects.equals(this.mail, resourcesMailForwardActionDocs.mail) + && Objects.equals(this.description, resourcesMailForwardActionDocs.description) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(mail, description, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMailForwardActionDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" mail: ") + .append(toIndentedString(mail)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMessengerMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesMessengerMoActionDocs.java new file mode 100644 index 0000000..2736e04 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMessengerMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesMessengerMoHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesMessengerMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesMessengerMoActionDocs} instance. + */ + public ResourcesMessengerMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMessengerMoActionDocs resourcesMessengerMoActionDocs = (ResourcesMessengerMoActionDocs) o; + return Objects.equals(this.type, resourcesMessengerMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMessengerMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMessengerMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesMessengerMoConfigurationRequest.java new file mode 100644 index 0000000..44ee7dd --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMessengerMoConfigurationRequest.java @@ -0,0 +1,269 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesMessengerMoConfigurationRequest model. + */ +public class ResourcesMessengerMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private String resource; + + private ResourcesMessengerMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + private ResourcesPlatformDocs platform; + + /** + * Constructs a new {@link ResourcesMessengerMoConfigurationRequest} instance. + */ + public ResourcesMessengerMoConfigurationRequest() { + super("MESSENGER"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesMessengerMoConfigurationRequest instance}. + */ + public ResourcesMessengerMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesMessengerMoConfigurationRequest instance}. + */ + public ResourcesMessengerMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesMessengerMoConfigurationRequest instance}. + */ + public ResourcesMessengerMoConfigurationRequest forwarding(ResourcesMessengerMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesMessengerMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesMessengerMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesMessengerMoConfigurationRequest instance}. + */ + public ResourcesMessengerMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesMessengerMoConfigurationRequest instance}. + */ + public ResourcesMessengerMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMessengerMoConfigurationRequest resourcesMessengerMoConfigurationRequest = + (ResourcesMessengerMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesMessengerMoConfigurationRequest.resourceKey) + && Objects.equals(this.resource, resourcesMessengerMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesMessengerMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesMessengerMoConfigurationRequest.conversations) + && Objects.equals(this.platform, resourcesMessengerMoConfigurationRequest.platform) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, resource, forwarding, conversations, platform, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMessengerMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMessengerMoHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesMessengerMoHttpForwardDocs.java new file mode 100644 index 0000000..19c9d20 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMessengerMoHttpForwardDocs.java @@ -0,0 +1,164 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesMessengerMoHttpForwardDocs model. + */ +public class ResourcesMessengerMoHttpForwardDocs extends ResourcesMessengerMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesMessengerMoHttpForwardDocs} instance. + */ + public ResourcesMessengerMoHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesMessengerMoHttpForwardDocs instance}. + */ + public ResourcesMessengerMoHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesMessengerMoHttpForwardDocs instance}. + */ + public ResourcesMessengerMoHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMessengerMoHttpForwardDocs resourcesMessengerMoHttpForwardDocs = + (ResourcesMessengerMoHttpForwardDocs) o; + return Objects.equals(this.url, resourcesMessengerMoHttpForwardDocs.url) + && Objects.equals(this.format, resourcesMessengerMoHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMessengerMoHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMmsHttpForwardActionDocs.java b/src/main/java/com/infobip/model/ResourcesMmsHttpForwardActionDocs.java new file mode 100644 index 0000000..9ec277b --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMmsHttpForwardActionDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesMmsHttpForwardActionDocs model. + */ +public class ResourcesMmsHttpForwardActionDocs extends ResourcesMmsMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesMmsHttpForwardActionDocs} instance. + */ + public ResourcesMmsHttpForwardActionDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesMmsHttpForwardActionDocs instance}. + */ + public ResourcesMmsHttpForwardActionDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesMmsHttpForwardActionDocs instance}. + */ + public ResourcesMmsHttpForwardActionDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMmsHttpForwardActionDocs resourcesMmsHttpForwardActionDocs = (ResourcesMmsHttpForwardActionDocs) o; + return Objects.equals(this.url, resourcesMmsHttpForwardActionDocs.url) + && Objects.equals(this.format, resourcesMmsHttpForwardActionDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMmsHttpForwardActionDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMmsMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesMmsMoActionDocs.java new file mode 100644 index 0000000..cca3c4c --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMmsMoActionDocs.java @@ -0,0 +1,90 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesMmsHttpForwardActionDocs.class, name = "HTTP_FORWARD"), + @JsonSubTypes.Type(value = ResourcesMmsPullActionDocs.class, name = "PULL"), +}) +public abstract class ResourcesMmsMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesMmsMoActionDocs} instance. + */ + public ResourcesMmsMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMmsMoActionDocs resourcesMmsMoActionDocs = (ResourcesMmsMoActionDocs) o; + return Objects.equals(this.type, resourcesMmsMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMmsMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMmsMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesMmsMoConfigurationRequest.java new file mode 100644 index 0000000..5560e05 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMmsMoConfigurationRequest.java @@ -0,0 +1,361 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesMmsMoConfigurationRequest model. + */ +public class ResourcesMmsMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String numberKey; + + private ResourcesPlatformDocs platform; + + private String number; + + private String countryCode; + + private ResourcesMmsMoActionDocs forwarding; + + private ResourcesAutoResponseActionRequest autoResponse; + + private ResourcesBlockListConfigurationRequest blockListConfiguration; + + /** + * Constructs a new {@link ResourcesMmsMoConfigurationRequest} instance. + */ + public ResourcesMmsMoConfigurationRequest() { + super("MMS"); + } + + /** + * Sets numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @param numberKey + * @return This {@link ResourcesMmsMoConfigurationRequest instance}. + */ + public ResourcesMmsMoConfigurationRequest numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesMmsMoConfigurationRequest instance}. + */ + public ResourcesMmsMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @param number + * @return This {@link ResourcesMmsMoConfigurationRequest instance}. + */ + public ResourcesMmsMoConfigurationRequest number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesMmsMoConfigurationRequest instance}. + */ + public ResourcesMmsMoConfigurationRequest countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesMmsMoConfigurationRequest instance}. + */ + public ResourcesMmsMoConfigurationRequest forwarding(ResourcesMmsMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesMmsMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesMmsMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + * @return This {@link ResourcesMmsMoConfigurationRequest instance}. + */ + public ResourcesMmsMoConfigurationRequest autoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + return this; + } + + /** + * Returns autoResponse. + * + * @return autoResponse + */ + @JsonProperty("autoResponse") + public ResourcesAutoResponseActionRequest getAutoResponse() { + return autoResponse; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + */ + @JsonProperty("autoResponse") + public void setAutoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + * @return This {@link ResourcesMmsMoConfigurationRequest instance}. + */ + public ResourcesMmsMoConfigurationRequest blockListConfiguration( + ResourcesBlockListConfigurationRequest blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + return this; + } + + /** + * Returns blockListConfiguration. + * + * @return blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public ResourcesBlockListConfigurationRequest getBlockListConfiguration() { + return blockListConfiguration; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public void setBlockListConfiguration(ResourcesBlockListConfigurationRequest blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMmsMoConfigurationRequest resourcesMmsMoConfigurationRequest = (ResourcesMmsMoConfigurationRequest) o; + return Objects.equals(this.numberKey, resourcesMmsMoConfigurationRequest.numberKey) + && Objects.equals(this.platform, resourcesMmsMoConfigurationRequest.platform) + && Objects.equals(this.number, resourcesMmsMoConfigurationRequest.number) + && Objects.equals(this.countryCode, resourcesMmsMoConfigurationRequest.countryCode) + && Objects.equals(this.forwarding, resourcesMmsMoConfigurationRequest.forwarding) + && Objects.equals(this.autoResponse, resourcesMmsMoConfigurationRequest.autoResponse) + && Objects.equals( + this.blockListConfiguration, resourcesMmsMoConfigurationRequest.blockListConfiguration) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + numberKey, + platform, + number, + countryCode, + forwarding, + autoResponse, + blockListConfiguration, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMmsMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" autoResponse: ") + .append(toIndentedString(autoResponse)) + .append(newLine) + .append(" blockListConfiguration: ") + .append(toIndentedString(blockListConfiguration)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMmsPullActionDocs.java b/src/main/java/com/infobip/model/ResourcesMmsPullActionDocs.java new file mode 100644 index 0000000..9149632 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMmsPullActionDocs.java @@ -0,0 +1,110 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesMmsPullActionDocs model. + */ +public class ResourcesMmsPullActionDocs extends ResourcesMmsMoActionDocs { + + private String description; + + /** + * Constructs a new {@link ResourcesMmsPullActionDocs} instance. + */ + public ResourcesMmsPullActionDocs() { + super("PULL"); + } + + /** + * Sets description. + *

+ * Field description: + * Additional action description. + * + * @param description + * @return This {@link ResourcesMmsPullActionDocs instance}. + */ + public ResourcesMmsPullActionDocs description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Additional action description. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Additional action description. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMmsPullActionDocs resourcesMmsPullActionDocs = (ResourcesMmsPullActionDocs) o; + return Objects.equals(this.description, resourcesMmsPullActionDocs.description) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(description, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMmsPullActionDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesMoActionDocs.java new file mode 100644 index 0000000..184393c --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMoActionDocs.java @@ -0,0 +1,92 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesHttpForwardActionDocs.class, name = "HTTP_FORWARD"), + @JsonSubTypes.Type(value = ResourcesMailForwardActionDocs.class, name = "MAIL_FORWARD"), + @JsonSubTypes.Type(value = ResourcesPullActionDocs.class, name = "PULL"), + @JsonSubTypes.Type(value = ResourcesSmppForwardActionDocs.class, name = "SMPP_FORWARD"), +}) +public abstract class ResourcesMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesMoActionDocs} instance. + */ + public ResourcesMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMoActionDocs resourcesMoActionDocs = (ResourcesMoActionDocs) o; + return Objects.equals(this.type, resourcesMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesMoConfigurationRequest.java new file mode 100644 index 0000000..051fa17 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMoConfigurationRequest.java @@ -0,0 +1,262 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Represents ResourcesMoConfigurationRequest model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "channel", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAppleMbMoConfigurationRequest.class, name = "APPLE_MB"), + @JsonSubTypes.Type(value = ResourcesEmailDomainMoConfigurationRequest.class, name = "EMAIL"), + @JsonSubTypes.Type(value = ResourcesInstagramDmMoConfigurationRequest.class, name = "INSTAGRAM_DM"), + @JsonSubTypes.Type(value = ResourcesKakaoSangdamMoConfigurationRequest.class, name = "KAKAO_SANGDAM"), + @JsonSubTypes.Type(value = ResourcesLineOaMoConfigurationRequest.class, name = "LINE_OA"), + @JsonSubTypes.Type(value = ResourcesMessengerMoConfigurationRequest.class, name = "MESSENGER"), + @JsonSubTypes.Type(value = ResourcesMmsMoConfigurationRequest.class, name = "MMS"), + @JsonSubTypes.Type(value = ResourcesOpenChannelMoConfigurationRequest.class, name = "OPEN_CHANNEL"), + @JsonSubTypes.Type(value = ResourcesRcsMoConfigurationRequest.class, name = "RCS"), + @JsonSubTypes.Type(value = ResourcesSmsMoConfigurationRequest.class, name = "SMS"), + @JsonSubTypes.Type(value = ResourcesTelegramMoConfigurationRequest.class, name = "TELEGRAM"), + @JsonSubTypes.Type(value = ResourcesTikTokBmMoConfigurationRequest.class, name = "TIKTOK_BM"), + @JsonSubTypes.Type(value = ResourcesViberBmMoConfigurationRequest.class, name = "VIBER_BM"), + @JsonSubTypes.Type(value = ResourcesViberBotMoConfigurationRequest.class, name = "VIBER_BOT"), + @JsonSubTypes.Type(value = ResourcesWhatsAppMoConfigurationRequest.class, name = "WHATSAPP"), + @JsonSubTypes.Type(value = ResourcesZaloFollowerMoConfigurationRequest.class, name = "ZALO_FOLLOWER"), + @JsonSubTypes.Type(value = ResourcesZaloZnsMoConfigurationRequest.class, name = "ZALO_ZNS"), +}) +public abstract class ResourcesMoConfigurationRequest { + + private String keyword; + + private String username; + + private Set unset = null; + + protected final ResourcesConfigurationType channel; + + /** + * Constructs a new {@link ResourcesMoConfigurationRequest} instance. + */ + public ResourcesMoConfigurationRequest(String channel) { + this.channel = ResourcesConfigurationType.fromValue(channel); + } + + /** + * Sets keyword. + *

+ * Field description: + * Omitting this value or sending <code>NULL</code> will set keyword to <code>NULL</code> because it is a valid keyword which will match all values. + * + * @param keyword + * @return This {@link ResourcesMoConfigurationRequest instance}. + */ + public ResourcesMoConfigurationRequest keyword(String keyword) { + this.keyword = keyword; + return this; + } + + /** + * Returns keyword. + *

+ * Field description: + * Omitting this value or sending <code>NULL</code> will set keyword to <code>NULL</code> because it is a valid keyword which will match all values. + * + * @return keyword + */ + @JsonProperty("keyword") + public String getKeyword() { + return keyword; + } + + /** + * Sets keyword. + *

+ * Field description: + * Omitting this value or sending <code>NULL</code> will set keyword to <code>NULL</code> because it is a valid keyword which will match all values. + * + * @param keyword + */ + @JsonProperty("keyword") + public void setKeyword(String keyword) { + this.keyword = keyword; + } + + /** + * Sets username. + *

+ * Field description: + * Sets username that will be applied in appropriate actions. + * + * @param username + * @return This {@link ResourcesMoConfigurationRequest instance}. + */ + public ResourcesMoConfigurationRequest username(String username) { + this.username = username; + return this; + } + + /** + * Returns username. + *

+ * Field description: + * Sets username that will be applied in appropriate actions. + * + * @return username + */ + @JsonProperty("username") + public String getUsername() { + return username; + } + + /** + * Sets username. + *

+ * Field description: + * Sets username that will be applied in appropriate actions. + * + * @param username + */ + @JsonProperty("username") + public void setUsername(String username) { + this.username = username; + } + + /** + * Sets unset. + *

+ * Field description: + * Used for unsetting configuration options. <br /> <b>If a property appears both in unset, and in the body of the request, it will <u>FIRST</u> be removed, and then <u>UPDATED</u> with the value from the request body!</b> + * + * @param unset + * @return This {@link ResourcesMoConfigurationRequest instance}. + */ + public ResourcesMoConfigurationRequest unset(Set unset) { + this.unset = unset; + return this; + } + + /** + * Adds and item into unset. + *

+ * Field description: + * Used for unsetting configuration options. <br /> <b>If a property appears both in unset, and in the body of the request, it will <u>FIRST</u> be removed, and then <u>UPDATED</u> with the value from the request body!</b> + * + * @param unsetItem The item to be added to the list. + * @return This {@link ResourcesMoConfigurationRequest instance}. + */ + public ResourcesMoConfigurationRequest addUnsetItem(ResourcesUnsetOption unsetItem) { + if (this.unset == null) { + this.unset = new LinkedHashSet<>(); + } + this.unset.add(unsetItem); + return this; + } + + /** + * Returns unset. + *

+ * Field description: + * Used for unsetting configuration options. <br /> <b>If a property appears both in unset, and in the body of the request, it will <u>FIRST</u> be removed, and then <u>UPDATED</u> with the value from the request body!</b> + * + * @return unset + */ + @JsonProperty("unset") + public Set getUnset() { + return unset; + } + + /** + * Sets unset. + *

+ * Field description: + * Used for unsetting configuration options. <br /> <b>If a property appears both in unset, and in the body of the request, it will <u>FIRST</u> be removed, and then <u>UPDATED</u> with the value from the request body!</b> + * + * @param unset + */ + @JsonProperty("unset") + public void setUnset(Set unset) { + this.unset = unset; + } + + /** + * Returns channel. + *

+ * The field is required. + * + * @return channel + */ + @JsonProperty("channel") + public ResourcesConfigurationType getChannel() { + return channel; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMoConfigurationRequest resourcesMoConfigurationRequest = (ResourcesMoConfigurationRequest) o; + return Objects.equals(this.keyword, resourcesMoConfigurationRequest.keyword) + && Objects.equals(this.username, resourcesMoConfigurationRequest.username) + && Objects.equals(this.unset, resourcesMoConfigurationRequest.unset) + && Objects.equals(this.channel, resourcesMoConfigurationRequest.channel); + } + + @Override + public int hashCode() { + return Objects.hash(keyword, username, unset, channel); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMoConfigurationRequest {") + .append(newLine) + .append(" keyword: ") + .append(toIndentedString(keyword)) + .append(newLine) + .append(" username: ") + .append(toIndentedString(username)) + .append(newLine) + .append(" unset: ") + .append(toIndentedString(unset)) + .append(newLine) + .append(" channel: ") + .append(toIndentedString(channel)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesMoConfigurationResponse.java b/src/main/java/com/infobip/model/ResourcesMoConfigurationResponse.java new file mode 100644 index 0000000..211c332 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesMoConfigurationResponse.java @@ -0,0 +1,468 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Response for configuring MO resource. + */ +public class ResourcesMoConfigurationResponse { + + private String configurationKey; + + private ResourcesConfigurationType channel; + + private String keyword; + + private String username; + + private ResourcesPlatformDocs platform; + + private ResourcesMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + private ResourcesUseAnswers answers; + + private ResourcesAutoResponseActionResponse autoResponse; + + private ResourcesBlockListConfigurationResponse blockListConfiguration; + + /** + * Sets configurationKey. + *

+ * Field description: + * The key of a stored configuration. + *

+ * The field is required. + * + * @param configurationKey + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse configurationKey(String configurationKey) { + this.configurationKey = configurationKey; + return this; + } + + /** + * Returns configurationKey. + *

+ * Field description: + * The key of a stored configuration. + *

+ * The field is required. + * + * @return configurationKey + */ + @JsonProperty("configurationKey") + public String getConfigurationKey() { + return configurationKey; + } + + /** + * Sets configurationKey. + *

+ * Field description: + * The key of a stored configuration. + *

+ * The field is required. + * + * @param configurationKey + */ + @JsonProperty("configurationKey") + public void setConfigurationKey(String configurationKey) { + this.configurationKey = configurationKey; + } + + /** + * Sets channel. + * + * @param channel + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse channel(ResourcesConfigurationType channel) { + this.channel = channel; + return this; + } + + /** + * Returns channel. + * + * @return channel + */ + @JsonProperty("channel") + public ResourcesConfigurationType getChannel() { + return channel; + } + + /** + * Sets channel. + * + * @param channel + */ + @JsonProperty("channel") + public void setChannel(ResourcesConfigurationType channel) { + this.channel = channel; + } + + /** + * Sets keyword. + *

+ * Field description: + * Configuration keyword. + * + * @param keyword + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse keyword(String keyword) { + this.keyword = keyword; + return this; + } + + /** + * Returns keyword. + *

+ * Field description: + * Configuration keyword. + * + * @return keyword + */ + @JsonProperty("keyword") + public String getKeyword() { + return keyword; + } + + /** + * Sets keyword. + *

+ * Field description: + * Configuration keyword. + * + * @param keyword + */ + @JsonProperty("keyword") + public void setKeyword(String keyword) { + this.keyword = keyword; + } + + /** + * Sets username. + *

+ * Field description: + * Configuration username. + * + * @param username + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse username(String username) { + this.username = username; + return this; + } + + /** + * Returns username. + *

+ * Field description: + * Configuration username. + * + * @return username + */ + @JsonProperty("username") + public String getUsername() { + return username; + } + + /** + * Sets username. + *

+ * Field description: + * Configuration username. + * + * @param username + */ + @JsonProperty("username") + public void setUsername(String username) { + this.username = username; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse forwarding(ResourcesMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + /** + * Sets answers. + * + * @param answers + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse answers(ResourcesUseAnswers answers) { + this.answers = answers; + return this; + } + + /** + * Returns answers. + * + * @return answers + */ + @JsonProperty("answers") + public ResourcesUseAnswers getAnswers() { + return answers; + } + + /** + * Sets answers. + * + * @param answers + */ + @JsonProperty("answers") + public void setAnswers(ResourcesUseAnswers answers) { + this.answers = answers; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse autoResponse(ResourcesAutoResponseActionResponse autoResponse) { + this.autoResponse = autoResponse; + return this; + } + + /** + * Returns autoResponse. + * + * @return autoResponse + */ + @JsonProperty("autoResponse") + public ResourcesAutoResponseActionResponse getAutoResponse() { + return autoResponse; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + */ + @JsonProperty("autoResponse") + public void setAutoResponse(ResourcesAutoResponseActionResponse autoResponse) { + this.autoResponse = autoResponse; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + * @return This {@link ResourcesMoConfigurationResponse instance}. + */ + public ResourcesMoConfigurationResponse blockListConfiguration( + ResourcesBlockListConfigurationResponse blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + return this; + } + + /** + * Returns blockListConfiguration. + * + * @return blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public ResourcesBlockListConfigurationResponse getBlockListConfiguration() { + return blockListConfiguration; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public void setBlockListConfiguration(ResourcesBlockListConfigurationResponse blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesMoConfigurationResponse resourcesMoConfigurationResponse = (ResourcesMoConfigurationResponse) o; + return Objects.equals(this.configurationKey, resourcesMoConfigurationResponse.configurationKey) + && Objects.equals(this.channel, resourcesMoConfigurationResponse.channel) + && Objects.equals(this.keyword, resourcesMoConfigurationResponse.keyword) + && Objects.equals(this.username, resourcesMoConfigurationResponse.username) + && Objects.equals(this.platform, resourcesMoConfigurationResponse.platform) + && Objects.equals(this.forwarding, resourcesMoConfigurationResponse.forwarding) + && Objects.equals(this.conversations, resourcesMoConfigurationResponse.conversations) + && Objects.equals(this.answers, resourcesMoConfigurationResponse.answers) + && Objects.equals(this.autoResponse, resourcesMoConfigurationResponse.autoResponse) + && Objects.equals(this.blockListConfiguration, resourcesMoConfigurationResponse.blockListConfiguration); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationKey, + channel, + keyword, + username, + platform, + forwarding, + conversations, + answers, + autoResponse, + blockListConfiguration); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesMoConfigurationResponse {") + .append(newLine) + .append(" configurationKey: ") + .append(toIndentedString(configurationKey)) + .append(newLine) + .append(" channel: ") + .append(toIndentedString(channel)) + .append(newLine) + .append(" keyword: ") + .append(toIndentedString(keyword)) + .append(newLine) + .append(" username: ") + .append(toIndentedString(username)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append(" answers: ") + .append(toIndentedString(answers)) + .append(newLine) + .append(" autoResponse: ") + .append(toIndentedString(autoResponse)) + .append(newLine) + .append(" blockListConfiguration: ") + .append(toIndentedString(blockListConfiguration)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNetworkView.java b/src/main/java/com/infobip/model/ResourcesNetworkView.java new file mode 100644 index 0000000..20e09a9 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNetworkView.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Network data. + */ +public class ResourcesNetworkView { + + private String mccNnc; + + private String networkName; + + /** + * Sets mccNnc. + *

+ * Field description: + * Norm net code uniquely identifying the specific mobile network operator. + * + * @param mccNnc + * @return This {@link ResourcesNetworkView instance}. + */ + public ResourcesNetworkView mccNnc(String mccNnc) { + this.mccNnc = mccNnc; + return this; + } + + /** + * Returns mccNnc. + *

+ * Field description: + * Norm net code uniquely identifying the specific mobile network operator. + * + * @return mccNnc + */ + @JsonProperty("mccNnc") + public String getMccNnc() { + return mccNnc; + } + + /** + * Sets mccNnc. + *

+ * Field description: + * Norm net code uniquely identifying the specific mobile network operator. + * + * @param mccNnc + */ + @JsonProperty("mccNnc") + public void setMccNnc(String mccNnc) { + this.mccNnc = mccNnc; + } + + /** + * Sets networkName. + *

+ * Field description: + * Network name. + * + * @param networkName + * @return This {@link ResourcesNetworkView instance}. + */ + public ResourcesNetworkView networkName(String networkName) { + this.networkName = networkName; + return this; + } + + /** + * Returns networkName. + *

+ * Field description: + * Network name. + * + * @return networkName + */ + @JsonProperty("networkName") + public String getNetworkName() { + return networkName; + } + + /** + * Sets networkName. + *

+ * Field description: + * Network name. + * + * @param networkName + */ + @JsonProperty("networkName") + public void setNetworkName(String networkName) { + this.networkName = networkName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNetworkView resourcesNetworkView = (ResourcesNetworkView) o; + return Objects.equals(this.mccNnc, resourcesNetworkView.mccNnc) + && Objects.equals(this.networkName, resourcesNetworkView.networkName); + } + + @Override + public int hashCode() { + return Objects.hash(mccNnc, networkName); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNetworkView {") + .append(newLine) + .append(" mccNnc: ") + .append(toIndentedString(mccNnc)) + .append(newLine) + .append(" networkName: ") + .append(toIndentedString(networkName)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesNumberCoverageInfo.java new file mode 100644 index 0000000..eff4369 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberCoverageInfo.java @@ -0,0 +1,403 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the number coverage. + */ +public class ResourcesNumberCoverageInfo implements ResourcesIbResourceCoverageInfo { + + private String number; + + private String numberKey; + + private ResourcesPlatformDocs platform; + + private NumberType numberType; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets number. + *

+ * Field description: + * Phone number. + * + * @param number + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Phone number. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Phone number. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Number key. + * + * @param numberKey + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * Number key. + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Number key. + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets numberType. + * + * @param numberType + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo numberType(NumberType numberType) { + this.numberType = numberType; + return this; + } + + /** + * Returns numberType. + * + * @return numberType + */ + @JsonProperty("numberType") + public NumberType getNumberType() { + return numberType; + } + + /** + * Sets numberType. + * + * @param numberType + */ + @JsonProperty("numberType") + public void setNumberType(NumberType numberType) { + this.numberType = numberType; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + * + * @param capabilities + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo addCapabilitiesItem(ResourcesIbResourceCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesNumberCoverageInfo instance}. + */ + public ResourcesNumberCoverageInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNumberCoverageInfo resourcesNumberCoverageInfo = (ResourcesNumberCoverageInfo) o; + return Objects.equals(this.number, resourcesNumberCoverageInfo.number) + && Objects.equals(this.numberKey, resourcesNumberCoverageInfo.numberKey) + && Objects.equals(this.platform, resourcesNumberCoverageInfo.platform) + && Objects.equals(this.numberType, resourcesNumberCoverageInfo.numberType) + && Objects.equals(this.countryCode, resourcesNumberCoverageInfo.countryCode) + && Objects.equals(this.countryName, resourcesNumberCoverageInfo.countryName) + && Objects.equals(this.capabilities, resourcesNumberCoverageInfo.capabilities) + && Objects.equals(this.resourceType, resourcesNumberCoverageInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash( + number, numberKey, platform, numberType, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNumberCoverageInfo {") + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" numberType: ") + .append(toIndentedString(numberType)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberCoverageKey.java b/src/main/java/com/infobip/model/ResourcesNumberCoverageKey.java new file mode 100644 index 0000000..692cb67 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberCoverageKey.java @@ -0,0 +1,169 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesNumberCoverageKey model. + */ +public class ResourcesNumberCoverageKey extends ResourcesIbResourceCoverageKey { + + private String number; + + private String countryCode; + + /** + * Constructs a new {@link ResourcesNumberCoverageKey} instance. + */ + public ResourcesNumberCoverageKey() { + super("NUMBER"); + } + + /** + * Sets number. + *

+ * Field description: + * Phone number. + *

+ * The field is required. + * + * @param number + * @return This {@link ResourcesNumberCoverageKey instance}. + */ + public ResourcesNumberCoverageKey number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Phone number. + *

+ * The field is required. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Phone number. + *

+ * The field is required. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesNumberCoverageKey instance}. + */ + public ResourcesNumberCoverageKey countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNumberCoverageKey resourcesNumberCoverageKey = (ResourcesNumberCoverageKey) o; + return Objects.equals(this.number, resourcesNumberCoverageKey.number) + && Objects.equals(this.countryCode, resourcesNumberCoverageKey.countryCode) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(number, countryCode, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNumberCoverageKey {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberRequirementSpecsRequestApiDoc.java b/src/main/java/com/infobip/model/ResourcesNumberRequirementSpecsRequestApiDoc.java new file mode 100644 index 0000000..f71673c --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberRequirementSpecsRequestApiDoc.java @@ -0,0 +1,357 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesNumberRequirementSpecsRequestApiDoc model. + */ +public class ResourcesNumberRequirementSpecsRequestApiDoc implements ResourcesRequirementsLookupBody { + /** + * Type of resource. + */ + public enum TypeEnum { + NUMBER_PURCHASE("NUMBER_PURCHASE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private Integer quantity; + + private ResourcesResourceNumberType numberType; + + private List capabilities = new ArrayList<>(); + + private String countryCode; + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + * @return This {@link ResourcesNumberRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesNumberRequirementSpecsRequestApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets quantity. + *

+ * Field description: + * Amount of numbers. Default value is 1. + * + * @param quantity + * @return This {@link ResourcesNumberRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesNumberRequirementSpecsRequestApiDoc quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Returns quantity. + *

+ * Field description: + * Amount of numbers. Default value is 1. + * + * @return quantity + */ + @JsonProperty("quantity") + public Integer getQuantity() { + return quantity; + } + + /** + * Sets quantity. + *

+ * Field description: + * Amount of numbers. Default value is 1. + * + * @param quantity + */ + @JsonProperty("quantity") + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + /** + * Sets numberType. + *

+ * The field is required. + * + * @param numberType + * @return This {@link ResourcesNumberRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesNumberRequirementSpecsRequestApiDoc numberType(ResourcesResourceNumberType numberType) { + this.numberType = numberType; + return this; + } + + /** + * Returns numberType. + *

+ * The field is required. + * + * @return numberType + */ + @JsonProperty("numberType") + public ResourcesResourceNumberType getNumberType() { + return numberType; + } + + /** + * Sets numberType. + *

+ * The field is required. + * + * @param numberType + */ + @JsonProperty("numberType") + public void setNumberType(ResourcesResourceNumberType numberType) { + this.numberType = numberType; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the numbers. + *

+ * The field is required. + * + * @param capabilities + * @return This {@link ResourcesNumberRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesNumberRequirementSpecsRequestApiDoc capabilities( + List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the numbers. + *

+ * The field is required. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesNumberRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesNumberRequirementSpecsRequestApiDoc addCapabilitiesItem( + ResourcesResourceNumberCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new ArrayList<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the numbers. + *

+ * The field is required. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public List getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the numbers. + *

+ * The field is required. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(List capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesNumberRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesNumberRequirementSpecsRequestApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNumberRequirementSpecsRequestApiDoc resourcesNumberRequirementSpecsRequestApiDoc = + (ResourcesNumberRequirementSpecsRequestApiDoc) o; + return Objects.equals(this.type, resourcesNumberRequirementSpecsRequestApiDoc.type) + && Objects.equals(this.quantity, resourcesNumberRequirementSpecsRequestApiDoc.quantity) + && Objects.equals(this.numberType, resourcesNumberRequirementSpecsRequestApiDoc.numberType) + && Objects.equals(this.capabilities, resourcesNumberRequirementSpecsRequestApiDoc.capabilities) + && Objects.equals(this.countryCode, resourcesNumberRequirementSpecsRequestApiDoc.countryCode); + } + + @Override + public int hashCode() { + return Objects.hash(type, quantity, numberType, capabilities, countryCode); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNumberRequirementSpecsRequestApiDoc {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" quantity: ") + .append(toIndentedString(quantity)) + .append(newLine) + .append(" numberType: ") + .append(toIndentedString(numberType)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberResourceCapabilityChannelDocs.java b/src/main/java/com/infobip/model/ResourcesNumberResourceCapabilityChannelDocs.java new file mode 100644 index 0000000..20a3706 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberResourceCapabilityChannelDocs.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents ResourcesNumberResourceCapabilityChannelDocs enumeration. + */ +public enum ResourcesNumberResourceCapabilityChannelDocs { + SMS("SMS"), + MMS("MMS"); + + private final String value; + + ResourcesNumberResourceCapabilityChannelDocs(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesNumberResourceCapabilityChannelDocs fromValue(String value) { + for (ResourcesNumberResourceCapabilityChannelDocs enumElement : + ResourcesNumberResourceCapabilityChannelDocs.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberResourceFilter.java b/src/main/java/com/infobip/model/ResourcesNumberResourceFilter.java new file mode 100644 index 0000000..d39c598 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberResourceFilter.java @@ -0,0 +1,223 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Numeric filter for resources. + */ +public class ResourcesNumberResourceFilter extends ResourcesIbResourcesFilter { + + private String number; + + private String countryCode; + + private List capabilities = null; + + /** + * Constructs a new {@link ResourcesNumberResourceFilter} instance. + */ + public ResourcesNumberResourceFilter() { + super("NUMBER"); + } + + /** + * Sets number. + *

+ * Field description: + * Phone number. + * + * @param number + * @return This {@link ResourcesNumberResourceFilter instance}. + */ + public ResourcesNumberResourceFilter number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Phone number. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Phone number. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesNumberResourceFilter instance}. + */ + public ResourcesNumberResourceFilter countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Number capabilities + * + * @param capabilities + * @return This {@link ResourcesNumberResourceFilter instance}. + */ + public ResourcesNumberResourceFilter capabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Number capabilities + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceFilter instance}. + */ + public ResourcesNumberResourceFilter addCapabilitiesItem( + ResourcesNumberResourceCapabilityChannelDocs capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new ArrayList<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Number capabilities + * + * @return capabilities + */ + @JsonProperty("capabilities") + public List getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Number capabilities + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(List capabilities) { + this.capabilities = capabilities; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNumberResourceFilter resourcesNumberResourceFilter = (ResourcesNumberResourceFilter) o; + return Objects.equals(this.number, resourcesNumberResourceFilter.number) + && Objects.equals(this.countryCode, resourcesNumberResourceFilter.countryCode) + && Objects.equals(this.capabilities, resourcesNumberResourceFilter.capabilities) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(number, countryCode, capabilities, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNumberResourceFilter {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberResourceInfo.java b/src/main/java/com/infobip/model/ResourcesNumberResourceInfo.java new file mode 100644 index 0000000..54adc72 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberResourceInfo.java @@ -0,0 +1,415 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the numeric type of resource. + */ +public class ResourcesNumberResourceInfo implements ResourcesIbResourceInfo { + + private String number; + + private String numberKey; + + private ResourcesPlatformDocs platform; + + private ResourcesNumberTypeResourceMoDocs numberType; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets number. + *

+ * Field description: + * Phone number. + * + * @param number + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Phone number. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Phone number. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Number key. + * + * @param numberKey + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * Number key. + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Number key. + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets numberType. + * + * @param numberType + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo numberType(ResourcesNumberTypeResourceMoDocs numberType) { + this.numberType = numberType; + return this; + } + + /** + * Returns numberType. + * + * @return numberType + */ + @JsonProperty("numberType") + public ResourcesNumberTypeResourceMoDocs getNumberType() { + return numberType; + } + + /** + * Sets numberType. + * + * @param numberType + */ + @JsonProperty("numberType") + public void setNumberType(ResourcesNumberTypeResourceMoDocs numberType) { + this.numberType = numberType; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the number. + * + * @param capabilities + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the number. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo addCapabilitiesItem(ResourcesResourceCapabilityChannel capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the number. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the number. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesNumberResourceInfo instance}. + */ + public ResourcesNumberResourceInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNumberResourceInfo resourcesNumberResourceInfo = (ResourcesNumberResourceInfo) o; + return Objects.equals(this.number, resourcesNumberResourceInfo.number) + && Objects.equals(this.numberKey, resourcesNumberResourceInfo.numberKey) + && Objects.equals(this.platform, resourcesNumberResourceInfo.platform) + && Objects.equals(this.numberType, resourcesNumberResourceInfo.numberType) + && Objects.equals(this.countryCode, resourcesNumberResourceInfo.countryCode) + && Objects.equals(this.countryName, resourcesNumberResourceInfo.countryName) + && Objects.equals(this.capabilities, resourcesNumberResourceInfo.capabilities) + && Objects.equals(this.resourceType, resourcesNumberResourceInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash( + number, numberKey, platform, numberType, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNumberResourceInfo {") + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" numberType: ") + .append(toIndentedString(numberType)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberResourceOrderApiDoc.java b/src/main/java/com/infobip/model/ResourcesNumberResourceOrderApiDoc.java new file mode 100644 index 0000000..977c5f1 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberResourceOrderApiDoc.java @@ -0,0 +1,864 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents ResourcesNumberResourceOrderApiDoc model. + */ +public class ResourcesNumberResourceOrderApiDoc + implements GetResourceRequest200Response, ResourcesPageResourceOrderApiDocResultsInner { + + private UUID id; + + /** + * Type of resource. + */ + public enum TypeEnum { + NUMBER_PURCHASE("NUMBER_PURCHASE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private String countryCode; + + private String requestedByEmailAddress; + + private List additionalContactEmailAddresses = null; + + private OffsetDateTime requestedDate; + + private ResourcesResourceOrderStatus status; + + private ResourcesResourceNumberType numberType; + + private List capabilities = null; + + private Integer quantity; + + private String note; + + private List numbers = null; + + private List requirementsFeedback = null; + + private List requirements = null; + + private Platform platform; + + /** + * Sets id. + *

+ * Field description: + * The ID of the resource. + * + * @param id + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc id(UUID id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The ID of the resource. + * + * @return id + */ + @JsonProperty("id") + public UUID getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The ID of the resource. + * + * @param id + */ + @JsonProperty("id") + public void setId(UUID id) { + this.id = id; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + * + * @param type + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @param countryCode + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @param requestedByEmailAddress + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc requestedByEmailAddress(String requestedByEmailAddress) { + this.requestedByEmailAddress = requestedByEmailAddress; + return this; + } + + /** + * Returns requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @return requestedByEmailAddress + */ + @JsonProperty("requestedByEmailAddress") + public String getRequestedByEmailAddress() { + return requestedByEmailAddress; + } + + /** + * Sets requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @param requestedByEmailAddress + */ + @JsonProperty("requestedByEmailAddress") + public void setRequestedByEmailAddress(String requestedByEmailAddress) { + this.requestedByEmailAddress = requestedByEmailAddress; + } + + /** + * Sets additionalContactEmailAddresses. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmailAddresses + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc additionalContactEmailAddresses( + List additionalContactEmailAddresses) { + this.additionalContactEmailAddresses = additionalContactEmailAddresses; + return this; + } + + /** + * Adds and item into additionalContactEmailAddresses. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmailAddressesItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc addAdditionalContactEmailAddressesItem( + String additionalContactEmailAddressesItem) { + if (this.additionalContactEmailAddresses == null) { + this.additionalContactEmailAddresses = new ArrayList<>(); + } + this.additionalContactEmailAddresses.add(additionalContactEmailAddressesItem); + return this; + } + + /** + * Returns additionalContactEmailAddresses. + *

+ * Field description: + * Additional email addresses. + * + * @return additionalContactEmailAddresses + */ + @JsonProperty("additionalContactEmailAddresses") + public List getAdditionalContactEmailAddresses() { + return additionalContactEmailAddresses; + } + + /** + * Sets additionalContactEmailAddresses. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmailAddresses + */ + @JsonProperty("additionalContactEmailAddresses") + public void setAdditionalContactEmailAddresses(List additionalContactEmailAddresses) { + this.additionalContactEmailAddresses = additionalContactEmailAddresses; + } + + /** + * Sets requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @param requestedDate + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc requestedDate(OffsetDateTime requestedDate) { + this.requestedDate = requestedDate; + return this; + } + + /** + * Returns requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @return requestedDate + */ + @JsonProperty("requestedDate") + public OffsetDateTime getRequestedDate() { + return requestedDate; + } + + /** + * Sets requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @param requestedDate + */ + @JsonProperty("requestedDate") + public void setRequestedDate(OffsetDateTime requestedDate) { + this.requestedDate = requestedDate; + } + + /** + * Sets status. + * + * @param status + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc status(ResourcesResourceOrderStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + * + * @return status + */ + @JsonProperty("status") + public ResourcesResourceOrderStatus getStatus() { + return status; + } + + /** + * Sets status. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(ResourcesResourceOrderStatus status) { + this.status = status; + } + + /** + * Sets numberType. + * + * @param numberType + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc numberType(ResourcesResourceNumberType numberType) { + this.numberType = numberType; + return this; + } + + /** + * Returns numberType. + * + * @return numberType + */ + @JsonProperty("numberType") + public ResourcesResourceNumberType getNumberType() { + return numberType; + } + + /** + * Sets numberType. + * + * @param numberType + */ + @JsonProperty("numberType") + public void setNumberType(ResourcesResourceNumberType numberType) { + this.numberType = numberType; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the numbers. + * + * @param capabilities + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc capabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the numbers. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc addCapabilitiesItem(ResourcesResourceNumberCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new ArrayList<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the numbers. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public List getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the numbers. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(List capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets quantity. + *

+ * Field description: + * Amount of numbers. + * + * @param quantity + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Returns quantity. + *

+ * Field description: + * Amount of numbers. + * + * @return quantity + */ + @JsonProperty("quantity") + public Integer getQuantity() { + return quantity; + } + + /** + * Sets quantity. + *

+ * Field description: + * Amount of numbers. + * + * @param quantity + */ + @JsonProperty("quantity") + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc note(String note) { + this.note = note; + return this; + } + + /** + * Returns note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @return note + */ + @JsonProperty("note") + public String getNote() { + return note; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + */ + @JsonProperty("note") + public void setNote(String note) { + this.note = note; + } + + /** + * Sets numbers. + *

+ * Field description: + * List of numbers linked with the resource. + * + * @param numbers + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc numbers(List numbers) { + this.numbers = numbers; + return this; + } + + /** + * Adds and item into numbers. + *

+ * Field description: + * List of numbers linked with the resource. + * + * @param numbersItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc addNumbersItem(ResourcesProcuredNumber numbersItem) { + if (this.numbers == null) { + this.numbers = new ArrayList<>(); + } + this.numbers.add(numbersItem); + return this; + } + + /** + * Returns numbers. + *

+ * Field description: + * List of numbers linked with the resource. + * + * @return numbers + */ + @JsonProperty("numbers") + public List getNumbers() { + return numbers; + } + + /** + * Sets numbers. + *

+ * Field description: + * List of numbers linked with the resource. + * + * @param numbers + */ + @JsonProperty("numbers") + public void setNumbers(List numbers) { + this.numbers = numbers; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedback + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc requirementsFeedback( + List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + return this; + } + + /** + * Adds and item into requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedbackItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc addRequirementsFeedbackItem( + ResourcesFilledRequirementFeedback requirementsFeedbackItem) { + if (this.requirementsFeedback == null) { + this.requirementsFeedback = new ArrayList<>(); + } + this.requirementsFeedback.add(requirementsFeedbackItem); + return this; + } + + /** + * Returns requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @return requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public List getRequirementsFeedback() { + return requirementsFeedback; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public void setRequirementsFeedback(List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirements + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc requirements(List requirements) { + this.requirements = requirements; + return this; + } + + /** + * Adds and item into requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirementsItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc addRequirementsItem(ResourcesFilledRequirement requirementsItem) { + if (this.requirements == null) { + this.requirements = new ArrayList<>(); + } + this.requirements.add(requirementsItem); + return this; + } + + /** + * Returns requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @return requirements + */ + @JsonProperty("requirements") + public List getRequirements() { + return requirements; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirements + */ + @JsonProperty("requirements") + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesNumberResourceOrderApiDoc instance}. + */ + public ResourcesNumberResourceOrderApiDoc platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNumberResourceOrderApiDoc resourcesNumberResourceOrderApiDoc = (ResourcesNumberResourceOrderApiDoc) o; + return Objects.equals(this.id, resourcesNumberResourceOrderApiDoc.id) + && Objects.equals(this.type, resourcesNumberResourceOrderApiDoc.type) + && Objects.equals(this.countryCode, resourcesNumberResourceOrderApiDoc.countryCode) + && Objects.equals( + this.requestedByEmailAddress, resourcesNumberResourceOrderApiDoc.requestedByEmailAddress) + && Objects.equals( + this.additionalContactEmailAddresses, + resourcesNumberResourceOrderApiDoc.additionalContactEmailAddresses) + && Objects.equals(this.requestedDate, resourcesNumberResourceOrderApiDoc.requestedDate) + && Objects.equals(this.status, resourcesNumberResourceOrderApiDoc.status) + && Objects.equals(this.numberType, resourcesNumberResourceOrderApiDoc.numberType) + && Objects.equals(this.capabilities, resourcesNumberResourceOrderApiDoc.capabilities) + && Objects.equals(this.quantity, resourcesNumberResourceOrderApiDoc.quantity) + && Objects.equals(this.note, resourcesNumberResourceOrderApiDoc.note) + && Objects.equals(this.numbers, resourcesNumberResourceOrderApiDoc.numbers) + && Objects.equals(this.requirementsFeedback, resourcesNumberResourceOrderApiDoc.requirementsFeedback) + && Objects.equals(this.requirements, resourcesNumberResourceOrderApiDoc.requirements) + && Objects.equals(this.platform, resourcesNumberResourceOrderApiDoc.platform); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + type, + countryCode, + requestedByEmailAddress, + additionalContactEmailAddresses, + requestedDate, + status, + numberType, + capabilities, + quantity, + note, + numbers, + requirementsFeedback, + requirements, + platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNumberResourceOrderApiDoc {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" requestedByEmailAddress: ") + .append(toIndentedString(requestedByEmailAddress)) + .append(newLine) + .append(" additionalContactEmailAddresses: ") + .append(toIndentedString(additionalContactEmailAddresses)) + .append(newLine) + .append(" requestedDate: ") + .append(toIndentedString(requestedDate)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" numberType: ") + .append(toIndentedString(numberType)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" quantity: ") + .append(toIndentedString(quantity)) + .append(newLine) + .append(" note: ") + .append(toIndentedString(note)) + .append(newLine) + .append(" numbers: ") + .append(toIndentedString(numbers)) + .append(newLine) + .append(" requirementsFeedback: ") + .append(toIndentedString(requirementsFeedback)) + .append(newLine) + .append(" requirements: ") + .append(toIndentedString(requirements)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberResourceOrderRequestApiDoc.java b/src/main/java/com/infobip/model/ResourcesNumberResourceOrderRequestApiDoc.java new file mode 100644 index 0000000..b9bf6d9 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberResourceOrderRequestApiDoc.java @@ -0,0 +1,523 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesNumberResourceOrderRequestApiDoc model. + */ +public class ResourcesNumberResourceOrderRequestApiDoc implements ResourcesSubmitResourceRequestBody { + /** + * Type of resource. + */ + public enum TypeEnum { + NUMBER_PURCHASE("NUMBER_PURCHASE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private Integer quantity; + + private ResourcesResourceNumberType numberType; + + private List capabilities = new ArrayList<>(); + + private List additionalContactEmails = null; + + private String countryCode; + + private List requirements = null; + + private Platform platform; + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets quantity. + *

+ * Field description: + * Amount of numbers. + * + * @param quantity + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Returns quantity. + *

+ * Field description: + * Amount of numbers. + * + * @return quantity + */ + @JsonProperty("quantity") + public Integer getQuantity() { + return quantity; + } + + /** + * Sets quantity. + *

+ * Field description: + * Amount of numbers. + * + * @param quantity + */ + @JsonProperty("quantity") + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + /** + * Sets numberType. + *

+ * The field is required. + * + * @param numberType + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc numberType(ResourcesResourceNumberType numberType) { + this.numberType = numberType; + return this; + } + + /** + * Returns numberType. + *

+ * The field is required. + * + * @return numberType + */ + @JsonProperty("numberType") + public ResourcesResourceNumberType getNumberType() { + return numberType; + } + + /** + * Sets numberType. + *

+ * The field is required. + * + * @param numberType + */ + @JsonProperty("numberType") + public void setNumberType(ResourcesResourceNumberType numberType) { + this.numberType = numberType; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the numbers. + *

+ * The field is required. + * + * @param capabilities + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc capabilities( + List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the numbers. + *

+ * The field is required. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc addCapabilitiesItem( + ResourcesResourceNumberCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new ArrayList<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the numbers. + *

+ * The field is required. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public List getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the numbers. + *

+ * The field is required. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(List capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmails + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc additionalContactEmails(List additionalContactEmails) { + this.additionalContactEmails = additionalContactEmails; + return this; + } + + /** + * Adds and item into additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmailsItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc addAdditionalContactEmailsItem( + String additionalContactEmailsItem) { + if (this.additionalContactEmails == null) { + this.additionalContactEmails = new ArrayList<>(); + } + this.additionalContactEmails.add(additionalContactEmailsItem); + return this; + } + + /** + * Returns additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @return additionalContactEmails + */ + @JsonProperty("additionalContactEmails") + public List getAdditionalContactEmails() { + return additionalContactEmails; + } + + /** + * Sets additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmails + */ + @JsonProperty("additionalContactEmails") + public void setAdditionalContactEmails(List additionalContactEmails) { + this.additionalContactEmails = additionalContactEmails; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirements + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc requirements(List requirements) { + this.requirements = requirements; + return this; + } + + /** + * Adds and item into requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirementsItem The item to be added to the list. + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc addRequirementsItem(ResourcesFilledRequirement requirementsItem) { + if (this.requirements == null) { + this.requirements = new ArrayList<>(); + } + this.requirements.add(requirementsItem); + return this; + } + + /** + * Returns requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @return requirements + */ + @JsonProperty("requirements") + public List getRequirements() { + return requirements; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirements + */ + @JsonProperty("requirements") + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesNumberResourceOrderRequestApiDoc instance}. + */ + public ResourcesNumberResourceOrderRequestApiDoc platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNumberResourceOrderRequestApiDoc resourcesNumberResourceOrderRequestApiDoc = + (ResourcesNumberResourceOrderRequestApiDoc) o; + return Objects.equals(this.type, resourcesNumberResourceOrderRequestApiDoc.type) + && Objects.equals(this.quantity, resourcesNumberResourceOrderRequestApiDoc.quantity) + && Objects.equals(this.numberType, resourcesNumberResourceOrderRequestApiDoc.numberType) + && Objects.equals(this.capabilities, resourcesNumberResourceOrderRequestApiDoc.capabilities) + && Objects.equals( + this.additionalContactEmails, resourcesNumberResourceOrderRequestApiDoc.additionalContactEmails) + && Objects.equals(this.countryCode, resourcesNumberResourceOrderRequestApiDoc.countryCode) + && Objects.equals(this.requirements, resourcesNumberResourceOrderRequestApiDoc.requirements) + && Objects.equals(this.platform, resourcesNumberResourceOrderRequestApiDoc.platform); + } + + @Override + public int hashCode() { + return Objects.hash( + type, quantity, numberType, capabilities, additionalContactEmails, countryCode, requirements, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNumberResourceOrderRequestApiDoc {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" quantity: ") + .append(toIndentedString(quantity)) + .append(newLine) + .append(" numberType: ") + .append(toIndentedString(numberType)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" additionalContactEmails: ") + .append(toIndentedString(additionalContactEmails)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" requirements: ") + .append(toIndentedString(requirements)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberStatus.java b/src/main/java/com/infobip/model/ResourcesNumberStatus.java new file mode 100644 index 0000000..af44850 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberStatus.java @@ -0,0 +1,46 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Status of the number. + */ +public enum ResourcesNumberStatus { + SUCCESS("SUCCESS"); + + private final String value; + + ResourcesNumberStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesNumberStatus fromValue(String value) { + for (ResourcesNumberStatus enumElement : ResourcesNumberStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberTypeResourceMoDocs.java b/src/main/java/com/infobip/model/ResourcesNumberTypeResourceMoDocs.java new file mode 100644 index 0000000..f6a4f7e --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberTypeResourceMoDocs.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Number type. + */ +public enum ResourcesNumberTypeResourceMoDocs { + VIRTUAL_LONG_NUMBER("VIRTUAL_LONG_NUMBER"), + SHORT_CODE("SHORT_CODE"); + + private final String value; + + ResourcesNumberTypeResourceMoDocs(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesNumberTypeResourceMoDocs fromValue(String value) { + for (ResourcesNumberTypeResourceMoDocs enumElement : ResourcesNumberTypeResourceMoDocs.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesNumberWebhookNotifApiDoc.java b/src/main/java/com/infobip/model/ResourcesNumberWebhookNotifApiDoc.java new file mode 100644 index 0000000..5ec8af5 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesNumberWebhookNotifApiDoc.java @@ -0,0 +1,409 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesNumberWebhookNotifApiDoc model. + */ +public class ResourcesNumberWebhookNotifApiDoc implements ResourcesWebhookNotifApiDocResultContent { + + private String id; + + /** + * Status of the resource request. + */ + public enum StatusEnum { + UPDATE_REQUESTED("UPDATE_REQUESTED"), + UPDATE_REQUESTED_BY_INTERNAL_REVIEWER("UPDATE_REQUESTED_BY_INTERNAL_REVIEWER"), + REJECTED("REJECTED"), + COMPLETED("COMPLETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum enumElement : StatusEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private StatusEnum status; + + private List numbers = null; + + private List requirementsFeedback = null; + + private String note; + + private ResourcesWebhookNotifContentType type; + + /** + * Sets id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @param id + * @return This {@link ResourcesNumberWebhookNotifApiDoc instance}. + */ + public ResourcesNumberWebhookNotifApiDoc id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + /** + * Sets status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @param status + * @return This {@link ResourcesNumberWebhookNotifApiDoc instance}. + */ + public ResourcesNumberWebhookNotifApiDoc status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Returns status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @return status + */ + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + /** + * Sets status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(StatusEnum status) { + this.status = status; + } + + /** + * Sets numbers. + *

+ * Field description: + * List of numbers linked with the resource. + * + * @param numbers + * @return This {@link ResourcesNumberWebhookNotifApiDoc instance}. + */ + public ResourcesNumberWebhookNotifApiDoc numbers(List numbers) { + this.numbers = numbers; + return this; + } + + /** + * Adds and item into numbers. + *

+ * Field description: + * List of numbers linked with the resource. + * + * @param numbersItem The item to be added to the list. + * @return This {@link ResourcesNumberWebhookNotifApiDoc instance}. + */ + public ResourcesNumberWebhookNotifApiDoc addNumbersItem(ResourcesProcuredNumber numbersItem) { + if (this.numbers == null) { + this.numbers = new ArrayList<>(); + } + this.numbers.add(numbersItem); + return this; + } + + /** + * Returns numbers. + *

+ * Field description: + * List of numbers linked with the resource. + * + * @return numbers + */ + @JsonProperty("numbers") + public List getNumbers() { + return numbers; + } + + /** + * Sets numbers. + *

+ * Field description: + * List of numbers linked with the resource. + * + * @param numbers + */ + @JsonProperty("numbers") + public void setNumbers(List numbers) { + this.numbers = numbers; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedback + * @return This {@link ResourcesNumberWebhookNotifApiDoc instance}. + */ + public ResourcesNumberWebhookNotifApiDoc requirementsFeedback( + List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + return this; + } + + /** + * Adds and item into requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedbackItem The item to be added to the list. + * @return This {@link ResourcesNumberWebhookNotifApiDoc instance}. + */ + public ResourcesNumberWebhookNotifApiDoc addRequirementsFeedbackItem( + ResourcesFilledRequirementFeedbackApiDoc requirementsFeedbackItem) { + if (this.requirementsFeedback == null) { + this.requirementsFeedback = new ArrayList<>(); + } + this.requirementsFeedback.add(requirementsFeedbackItem); + return this; + } + + /** + * Returns requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @return requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public List getRequirementsFeedback() { + return requirementsFeedback; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public void setRequirementsFeedback(List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + * @return This {@link ResourcesNumberWebhookNotifApiDoc instance}. + */ + public ResourcesNumberWebhookNotifApiDoc note(String note) { + this.note = note; + return this; + } + + /** + * Returns note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @return note + */ + @JsonProperty("note") + public String getNote() { + return note; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + */ + @JsonProperty("note") + public void setNote(String note) { + this.note = note; + } + + /** + * Sets type. + * + * @param type + * @return This {@link ResourcesNumberWebhookNotifApiDoc instance}. + */ + public ResourcesNumberWebhookNotifApiDoc type(ResourcesWebhookNotifContentType type) { + this.type = type; + return this; + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public ResourcesWebhookNotifContentType getType() { + return type; + } + + /** + * Sets type. + * + * @param type + */ + @JsonProperty("type") + public void setType(ResourcesWebhookNotifContentType type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesNumberWebhookNotifApiDoc resourcesNumberWebhookNotifApiDoc = (ResourcesNumberWebhookNotifApiDoc) o; + return Objects.equals(this.id, resourcesNumberWebhookNotifApiDoc.id) + && Objects.equals(this.status, resourcesNumberWebhookNotifApiDoc.status) + && Objects.equals(this.numbers, resourcesNumberWebhookNotifApiDoc.numbers) + && Objects.equals(this.requirementsFeedback, resourcesNumberWebhookNotifApiDoc.requirementsFeedback) + && Objects.equals(this.note, resourcesNumberWebhookNotifApiDoc.note) + && Objects.equals(this.type, resourcesNumberWebhookNotifApiDoc.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, numbers, requirementsFeedback, note, type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesNumberWebhookNotifApiDoc {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" numbers: ") + .append(toIndentedString(numbers)) + .append(newLine) + .append(" requirementsFeedback: ") + .append(toIndentedString(requirementsFeedback)) + .append(newLine) + .append(" note: ") + .append(toIndentedString(note)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesOpenChannelCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesOpenChannelCoverageInfo.java new file mode 100644 index 0000000..a3635ab --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesOpenChannelCoverageInfo.java @@ -0,0 +1,236 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the sender coverage. + */ +public class ResourcesOpenChannelCoverageInfo implements ResourcesIbResourceCoverageInfo { + + private String resource; + + private Boolean shared; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesOpenChannelCoverageInfo instance}. + */ + public ResourcesOpenChannelCoverageInfo resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @param shared + * @return This {@link ResourcesOpenChannelCoverageInfo instance}. + */ + public ResourcesOpenChannelCoverageInfo shared(Boolean shared) { + this.shared = shared; + return this; + } + + /** + * Returns shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @return shared + */ + @JsonProperty("shared") + public Boolean getShared() { + return shared; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @param shared + */ + @JsonProperty("shared") + public void setShared(Boolean shared) { + this.shared = shared; + } + + /** + * Sets capabilities. + * + * @param capabilities + * @return This {@link ResourcesOpenChannelCoverageInfo instance}. + */ + public ResourcesOpenChannelCoverageInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesOpenChannelCoverageInfo instance}. + */ + public ResourcesOpenChannelCoverageInfo addCapabilitiesItem(ResourcesIbResourceCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesOpenChannelCoverageInfo instance}. + */ + public ResourcesOpenChannelCoverageInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesOpenChannelCoverageInfo resourcesOpenChannelCoverageInfo = (ResourcesOpenChannelCoverageInfo) o; + return Objects.equals(this.resource, resourcesOpenChannelCoverageInfo.resource) + && Objects.equals(this.shared, resourcesOpenChannelCoverageInfo.shared) + && Objects.equals(this.capabilities, resourcesOpenChannelCoverageInfo.capabilities) + && Objects.equals(this.resourceType, resourcesOpenChannelCoverageInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resource, shared, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesOpenChannelCoverageInfo {") + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" shared: ") + .append(toIndentedString(shared)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesOpenChannelCoverageKey.java b/src/main/java/com/infobip/model/ResourcesOpenChannelCoverageKey.java new file mode 100644 index 0000000..1a09bc4 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesOpenChannelCoverageKey.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesOpenChannelCoverageKey model. + */ +public class ResourcesOpenChannelCoverageKey extends ResourcesIbResourceCoverageKey { + + private String resource; + + private String displayName; + + /** + * Constructs a new {@link ResourcesOpenChannelCoverageKey} instance. + */ + public ResourcesOpenChannelCoverageKey() { + super("OPEN_CHANNEL_RESOURCE"); + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @param resource + * @return This {@link ResourcesOpenChannelCoverageKey instance}. + */ + public ResourcesOpenChannelCoverageKey resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + * @return This {@link ResourcesOpenChannelCoverageKey instance}. + */ + public ResourcesOpenChannelCoverageKey displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Returns displayName. + *

+ * Field description: + * Display name. + * + * @return displayName + */ + @JsonProperty("displayName") + public String getDisplayName() { + return displayName; + } + + /** + * Sets displayName. + *

+ * Field description: + * Display name. + * + * @param displayName + */ + @JsonProperty("displayName") + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesOpenChannelCoverageKey resourcesOpenChannelCoverageKey = (ResourcesOpenChannelCoverageKey) o; + return Objects.equals(this.resource, resourcesOpenChannelCoverageKey.resource) + && Objects.equals(this.displayName, resourcesOpenChannelCoverageKey.displayName) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resource, displayName, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesOpenChannelCoverageKey {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" displayName: ") + .append(toIndentedString(displayName)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesOpenChannelHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesOpenChannelHttpForwardDocs.java new file mode 100644 index 0000000..2fe4656 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesOpenChannelHttpForwardDocs.java @@ -0,0 +1,164 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesOpenChannelHttpForwardDocs model. + */ +public class ResourcesOpenChannelHttpForwardDocs extends ResourcesOpenChannelMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesOpenChannelHttpForwardDocs} instance. + */ + public ResourcesOpenChannelHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesOpenChannelHttpForwardDocs instance}. + */ + public ResourcesOpenChannelHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesOpenChannelHttpForwardDocs instance}. + */ + public ResourcesOpenChannelHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesOpenChannelHttpForwardDocs resourcesOpenChannelHttpForwardDocs = + (ResourcesOpenChannelHttpForwardDocs) o; + return Objects.equals(this.url, resourcesOpenChannelHttpForwardDocs.url) + && Objects.equals(this.format, resourcesOpenChannelHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesOpenChannelHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesOpenChannelMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesOpenChannelMoActionDocs.java new file mode 100644 index 0000000..2805218 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesOpenChannelMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesOpenChannelHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesOpenChannelMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesOpenChannelMoActionDocs} instance. + */ + public ResourcesOpenChannelMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesOpenChannelMoActionDocs resourcesOpenChannelMoActionDocs = (ResourcesOpenChannelMoActionDocs) o; + return Objects.equals(this.type, resourcesOpenChannelMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesOpenChannelMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesOpenChannelMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesOpenChannelMoConfigurationRequest.java new file mode 100644 index 0000000..82b8257 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesOpenChannelMoConfigurationRequest.java @@ -0,0 +1,306 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesOpenChannelMoConfigurationRequest model. + */ +public class ResourcesOpenChannelMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private ResourcesPlatformDocs platform; + + private String resource; + + private ResourcesOpenChannelMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + private ResourcesUseAnswers answers; + + /** + * Constructs a new {@link ResourcesOpenChannelMoConfigurationRequest} instance. + */ + public ResourcesOpenChannelMoConfigurationRequest() { + super("OPEN_CHANNEL"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesOpenChannelMoConfigurationRequest instance}. + */ + public ResourcesOpenChannelMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesOpenChannelMoConfigurationRequest instance}. + */ + public ResourcesOpenChannelMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesOpenChannelMoConfigurationRequest instance}. + */ + public ResourcesOpenChannelMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesOpenChannelMoConfigurationRequest instance}. + */ + public ResourcesOpenChannelMoConfigurationRequest forwarding(ResourcesOpenChannelMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesOpenChannelMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesOpenChannelMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesOpenChannelMoConfigurationRequest instance}. + */ + public ResourcesOpenChannelMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + /** + * Sets answers. + * + * @param answers + * @return This {@link ResourcesOpenChannelMoConfigurationRequest instance}. + */ + public ResourcesOpenChannelMoConfigurationRequest answers(ResourcesUseAnswers answers) { + this.answers = answers; + return this; + } + + /** + * Returns answers. + * + * @return answers + */ + @JsonProperty("answers") + public ResourcesUseAnswers getAnswers() { + return answers; + } + + /** + * Sets answers. + * + * @param answers + */ + @JsonProperty("answers") + public void setAnswers(ResourcesUseAnswers answers) { + this.answers = answers; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesOpenChannelMoConfigurationRequest resourcesOpenChannelMoConfigurationRequest = + (ResourcesOpenChannelMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesOpenChannelMoConfigurationRequest.resourceKey) + && Objects.equals(this.platform, resourcesOpenChannelMoConfigurationRequest.platform) + && Objects.equals(this.resource, resourcesOpenChannelMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesOpenChannelMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesOpenChannelMoConfigurationRequest.conversations) + && Objects.equals(this.answers, resourcesOpenChannelMoConfigurationRequest.answers) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, platform, resource, forwarding, conversations, answers, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesOpenChannelMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append(" answers: ") + .append(toIndentedString(answers)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesOpenChannelResourceFilter.java b/src/main/java/com/infobip/model/ResourcesOpenChannelResourceFilter.java new file mode 100644 index 0000000..31a5e92 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesOpenChannelResourceFilter.java @@ -0,0 +1,110 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Open Channel filter for resources. + */ +public class ResourcesOpenChannelResourceFilter extends ResourcesIbResourcesFilter { + + private String resource; + + /** + * Constructs a new {@link ResourcesOpenChannelResourceFilter} instance. + */ + public ResourcesOpenChannelResourceFilter() { + super("OPEN_CHANNEL_RESOURCE"); + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesOpenChannelResourceFilter instance}. + */ + public ResourcesOpenChannelResourceFilter resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesOpenChannelResourceFilter resourcesOpenChannelResourceFilter = (ResourcesOpenChannelResourceFilter) o; + return Objects.equals(this.resource, resourcesOpenChannelResourceFilter.resource) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resource, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesOpenChannelResourceFilter {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesOpenChannelResourceInfo.java b/src/main/java/com/infobip/model/ResourcesOpenChannelResourceInfo.java new file mode 100644 index 0000000..f8d0ca5 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesOpenChannelResourceInfo.java @@ -0,0 +1,202 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about Open Channel type of resource. + */ +public class ResourcesOpenChannelResourceInfo implements ResourcesIbResourceInfo { + + private String resource; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesOpenChannelResourceInfo instance}. + */ + public ResourcesOpenChannelResourceInfo resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + * @return This {@link ResourcesOpenChannelResourceInfo instance}. + */ + public ResourcesOpenChannelResourceInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesOpenChannelResourceInfo instance}. + */ + public ResourcesOpenChannelResourceInfo addCapabilitiesItem(ResourcesResourceCapabilityChannel capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesOpenChannelResourceInfo instance}. + */ + public ResourcesOpenChannelResourceInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesOpenChannelResourceInfo resourcesOpenChannelResourceInfo = (ResourcesOpenChannelResourceInfo) o; + return Objects.equals(this.resource, resourcesOpenChannelResourceInfo.resource) + && Objects.equals(this.capabilities, resourcesOpenChannelResourceInfo.capabilities) + && Objects.equals(this.resourceType, resourcesOpenChannelResourceInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(resource, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesOpenChannelResourceInfo {") + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesPageResourceOrderApiDoc.java b/src/main/java/com/infobip/model/ResourcesPageResourceOrderApiDoc.java new file mode 100644 index 0000000..3b99c41 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesPageResourceOrderApiDoc.java @@ -0,0 +1,156 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesPageResourceOrderApiDoc model. + */ +public class ResourcesPageResourceOrderApiDoc { + + private List results = null; + + private PageInfo paging; + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + * @return This {@link ResourcesPageResourceOrderApiDoc instance}. + */ + public ResourcesPageResourceOrderApiDoc results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * The list of the results for this page. + * + * @param resultsItem The item to be added to the list. + * @return This {@link ResourcesPageResourceOrderApiDoc instance}. + */ + public ResourcesPageResourceOrderApiDoc addResultsItem(ResourcesPageResourceOrderApiDocResultsInner resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * The list of the results for this page. + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * The list of the results for this page. + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + /** + * Sets paging. + * + * @param paging + * @return This {@link ResourcesPageResourceOrderApiDoc instance}. + */ + public ResourcesPageResourceOrderApiDoc paging(PageInfo paging) { + this.paging = paging; + return this; + } + + /** + * Returns paging. + * + * @return paging + */ + @JsonProperty("paging") + public PageInfo getPaging() { + return paging; + } + + /** + * Sets paging. + * + * @param paging + */ + @JsonProperty("paging") + public void setPaging(PageInfo paging) { + this.paging = paging; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesPageResourceOrderApiDoc resourcesPageResourceOrderApiDoc = (ResourcesPageResourceOrderApiDoc) o; + return Objects.equals(this.results, resourcesPageResourceOrderApiDoc.results) + && Objects.equals(this.paging, resourcesPageResourceOrderApiDoc.paging); + } + + @Override + public int hashCode() { + return Objects.hash(results, paging); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesPageResourceOrderApiDoc {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append(" paging: ") + .append(toIndentedString(paging)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesPageResourceOrderApiDocResultsInner.java b/src/main/java/com/infobip/model/ResourcesPageResourceOrderApiDocResultsInner.java new file mode 100644 index 0000000..fa480da --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesPageResourceOrderApiDocResultsInner.java @@ -0,0 +1,21 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaResourceOrderApiDoc.class), + @JsonSubTypes.Type(value = ResourcesNumberResourceOrderApiDoc.class), + @JsonSubTypes.Type(value = ResourcesRcsSenderResourceOrderApiDoc.class) +}) +public interface ResourcesPageResourceOrderApiDocResultsInner {} diff --git a/src/main/java/com/infobip/model/ResourcesPlatformDocs.java b/src/main/java/com/infobip/model/ResourcesPlatformDocs.java new file mode 100644 index 0000000..473f45c --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesPlatformDocs.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Platform applicationId and entityId to apply to inbound messages that pair to this configuration. If not provided, or if set to default values (applicationId = default and entityId = null), values from the associated number/resource will be used. + */ +public class ResourcesPlatformDocs { + + private String applicationId; + + private String entityId; + + /** + * Sets applicationId. + *

+ * Field description: + * Platform applicationId. + * + * @param applicationId + * @return This {@link ResourcesPlatformDocs instance}. + */ + public ResourcesPlatformDocs applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * Platform applicationId. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Platform applicationId. + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Platform entityId. + * + * @param entityId + * @return This {@link ResourcesPlatformDocs instance}. + */ + public ResourcesPlatformDocs entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * Platform entityId. + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Platform entityId. + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesPlatformDocs resourcesPlatformDocs = (ResourcesPlatformDocs) o; + return Objects.equals(this.applicationId, resourcesPlatformDocs.applicationId) + && Objects.equals(this.entityId, resourcesPlatformDocs.entityId); + } + + @Override + public int hashCode() { + return Objects.hash(applicationId, entityId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesPlatformDocs {") + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesProcuredNumber.java b/src/main/java/com/infobip/model/ResourcesProcuredNumber.java new file mode 100644 index 0000000..fc3aa87 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesProcuredNumber.java @@ -0,0 +1,195 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * List of numbers linked with the resource. + */ +public class ResourcesProcuredNumber { + + private String number; + + private String numberKey; + + private ResourcesNumberStatus status; + + /** + * Sets number. + *

+ * Field description: + * Number. + *

+ * The field is required. + * + * @param number + * @return This {@link ResourcesProcuredNumber instance}. + */ + public ResourcesProcuredNumber number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Number. + *

+ * The field is required. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Number. + *

+ * The field is required. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Unique ID of a number. + * + * @param numberKey + * @return This {@link ResourcesProcuredNumber instance}. + */ + public ResourcesProcuredNumber numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * Unique ID of a number. + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Unique ID of a number. + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets status. + *

+ * The field is required. + * + * @param status + * @return This {@link ResourcesProcuredNumber instance}. + */ + public ResourcesProcuredNumber status(ResourcesNumberStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + *

+ * The field is required. + * + * @return status + */ + @JsonProperty("status") + public ResourcesNumberStatus getStatus() { + return status; + } + + /** + * Sets status. + *

+ * The field is required. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(ResourcesNumberStatus status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesProcuredNumber resourcesProcuredNumber = (ResourcesProcuredNumber) o; + return Objects.equals(this.number, resourcesProcuredNumber.number) + && Objects.equals(this.numberKey, resourcesProcuredNumber.numberKey) + && Objects.equals(this.status, resourcesProcuredNumber.status); + } + + @Override + public int hashCode() { + return Objects.hash(number, numberKey, status); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesProcuredNumber {") + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesPullActionDocs.java b/src/main/java/com/infobip/model/ResourcesPullActionDocs.java new file mode 100644 index 0000000..d706084 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesPullActionDocs.java @@ -0,0 +1,63 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import java.util.Objects; + +/** + * Represents ResourcesPullActionDocs model. + */ +public class ResourcesPullActionDocs extends ResourcesMoActionDocs { + + /** + * Constructs a new {@link ResourcesPullActionDocs} instance. + */ + public ResourcesPullActionDocs() { + super("PULL"); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesPullActionDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesRcsCoverageInfo.java new file mode 100644 index 0000000..5e27d66 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsCoverageInfo.java @@ -0,0 +1,282 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the sender coverage. + */ +public class ResourcesRcsCoverageInfo implements ResourcesIbResourceCoverageInfo { + + private String senderName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + * @return This {@link ResourcesRcsCoverageInfo instance}. + */ + public ResourcesRcsCoverageInfo senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Sender name. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesRcsCoverageInfo instance}. + */ + public ResourcesRcsCoverageInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesRcsCoverageInfo instance}. + */ + public ResourcesRcsCoverageInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + * + * @param capabilities + * @return This {@link ResourcesRcsCoverageInfo instance}. + */ + public ResourcesRcsCoverageInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesRcsCoverageInfo instance}. + */ + public ResourcesRcsCoverageInfo addCapabilitiesItem(ResourcesIbResourceCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesRcsCoverageInfo instance}. + */ + public ResourcesRcsCoverageInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsCoverageInfo resourcesRcsCoverageInfo = (ResourcesRcsCoverageInfo) o; + return Objects.equals(this.senderName, resourcesRcsCoverageInfo.senderName) + && Objects.equals(this.countryCode, resourcesRcsCoverageInfo.countryCode) + && Objects.equals(this.countryName, resourcesRcsCoverageInfo.countryName) + && Objects.equals(this.capabilities, resourcesRcsCoverageInfo.capabilities) + && Objects.equals(this.resourceType, resourcesRcsCoverageInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(senderName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsCoverageInfo {") + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsCoverageKey.java b/src/main/java/com/infobip/model/ResourcesRcsCoverageKey.java new file mode 100644 index 0000000..44668c8 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsCoverageKey.java @@ -0,0 +1,169 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesRcsCoverageKey model. + */ +public class ResourcesRcsCoverageKey extends ResourcesIbResourceCoverageKey { + + private String senderName; + + private String countryCode; + + /** + * Constructs a new {@link ResourcesRcsCoverageKey} instance. + */ + public ResourcesRcsCoverageKey() { + super("RCS_RESOURCE"); + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + *

+ * The field is required. + * + * @param senderName + * @return This {@link ResourcesRcsCoverageKey instance}. + */ + public ResourcesRcsCoverageKey senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Sender name. + *

+ * The field is required. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + *

+ * The field is required. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesRcsCoverageKey instance}. + */ + public ResourcesRcsCoverageKey countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsCoverageKey resourcesRcsCoverageKey = (ResourcesRcsCoverageKey) o; + return Objects.equals(this.senderName, resourcesRcsCoverageKey.senderName) + && Objects.equals(this.countryCode, resourcesRcsCoverageKey.countryCode) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(senderName, countryCode, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsCoverageKey {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesRcsHttpForwardDocs.java new file mode 100644 index 0000000..4d5097a --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsHttpForwardDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesRcsHttpForwardDocs model. + */ +public class ResourcesRcsHttpForwardDocs extends ResourcesRcsMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesRcsHttpForwardDocs} instance. + */ + public ResourcesRcsHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesRcsHttpForwardDocs instance}. + */ + public ResourcesRcsHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesRcsHttpForwardDocs instance}. + */ + public ResourcesRcsHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsHttpForwardDocs resourcesRcsHttpForwardDocs = (ResourcesRcsHttpForwardDocs) o; + return Objects.equals(this.url, resourcesRcsHttpForwardDocs.url) + && Objects.equals(this.format, resourcesRcsHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesRcsMoActionDocs.java new file mode 100644 index 0000000..641eff5 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesRcsHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesRcsMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesRcsMoActionDocs} instance. + */ + public ResourcesRcsMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsMoActionDocs resourcesRcsMoActionDocs = (ResourcesRcsMoActionDocs) o; + return Objects.equals(this.type, resourcesRcsMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesRcsMoConfigurationRequest.java new file mode 100644 index 0000000..20be864 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsMoConfigurationRequest.java @@ -0,0 +1,352 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesRcsMoConfigurationRequest model. + */ +public class ResourcesRcsMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private ResourcesPlatformDocs platform; + + private String resource; + + private ResourcesRcsMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + private ResourcesAutoResponseActionRequest autoResponse; + + private ResourcesBlockListConfigurationRequest blockListConfiguration; + + /** + * Constructs a new {@link ResourcesRcsMoConfigurationRequest} instance. + */ + public ResourcesRcsMoConfigurationRequest() { + super("RCS"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesRcsMoConfigurationRequest instance}. + */ + public ResourcesRcsMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesRcsMoConfigurationRequest instance}. + */ + public ResourcesRcsMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesRcsMoConfigurationRequest instance}. + */ + public ResourcesRcsMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesRcsMoConfigurationRequest instance}. + */ + public ResourcesRcsMoConfigurationRequest forwarding(ResourcesRcsMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesRcsMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesRcsMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesRcsMoConfigurationRequest instance}. + */ + public ResourcesRcsMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + * @return This {@link ResourcesRcsMoConfigurationRequest instance}. + */ + public ResourcesRcsMoConfigurationRequest autoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + return this; + } + + /** + * Returns autoResponse. + * + * @return autoResponse + */ + @JsonProperty("autoResponse") + public ResourcesAutoResponseActionRequest getAutoResponse() { + return autoResponse; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + */ + @JsonProperty("autoResponse") + public void setAutoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + * @return This {@link ResourcesRcsMoConfigurationRequest instance}. + */ + public ResourcesRcsMoConfigurationRequest blockListConfiguration( + ResourcesBlockListConfigurationRequest blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + return this; + } + + /** + * Returns blockListConfiguration. + * + * @return blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public ResourcesBlockListConfigurationRequest getBlockListConfiguration() { + return blockListConfiguration; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public void setBlockListConfiguration(ResourcesBlockListConfigurationRequest blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsMoConfigurationRequest resourcesRcsMoConfigurationRequest = (ResourcesRcsMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesRcsMoConfigurationRequest.resourceKey) + && Objects.equals(this.platform, resourcesRcsMoConfigurationRequest.platform) + && Objects.equals(this.resource, resourcesRcsMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesRcsMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesRcsMoConfigurationRequest.conversations) + && Objects.equals(this.autoResponse, resourcesRcsMoConfigurationRequest.autoResponse) + && Objects.equals( + this.blockListConfiguration, resourcesRcsMoConfigurationRequest.blockListConfiguration) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + resourceKey, + platform, + resource, + forwarding, + conversations, + autoResponse, + blockListConfiguration, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append(" autoResponse: ") + .append(toIndentedString(autoResponse)) + .append(newLine) + .append(" blockListConfiguration: ") + .append(toIndentedString(blockListConfiguration)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsRequirementSpecsRequestApiDoc.java b/src/main/java/com/infobip/model/ResourcesRcsRequirementSpecsRequestApiDoc.java new file mode 100644 index 0000000..d3b6079 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsRequirementSpecsRequestApiDoc.java @@ -0,0 +1,301 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesRcsRequirementSpecsRequestApiDoc model. + */ +public class ResourcesRcsRequirementSpecsRequestApiDoc implements ResourcesRequirementsLookupBody { + /** + * Type of resource. + */ + public enum TypeEnum { + RCS_SENDER_LAUNCH("RCS_SENDER_LAUNCH"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private String countryCode; + + private List excludedCarriers = null; + + private ResourcesTrafficOrigin trafficOrigin; + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + * @return This {@link ResourcesRcsRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesRcsRequirementSpecsRequestApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesRcsRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesRcsRequirementSpecsRequestApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriers + * @return This {@link ResourcesRcsRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesRcsRequirementSpecsRequestApiDoc excludedCarriers(List excludedCarriers) { + this.excludedCarriers = excludedCarriers; + return this; + } + + /** + * Adds and item into excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriersItem The item to be added to the list. + * @return This {@link ResourcesRcsRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesRcsRequirementSpecsRequestApiDoc addExcludedCarriersItem(String excludedCarriersItem) { + if (this.excludedCarriers == null) { + this.excludedCarriers = new ArrayList<>(); + } + this.excludedCarriers.add(excludedCarriersItem); + return this; + } + + /** + * Returns excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @return excludedCarriers + */ + @JsonProperty("excludedCarriers") + public List getExcludedCarriers() { + return excludedCarriers; + } + + /** + * Sets excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriers + */ + @JsonProperty("excludedCarriers") + public void setExcludedCarriers(List excludedCarriers) { + this.excludedCarriers = excludedCarriers; + } + + /** + * Sets trafficOrigin. + *

+ * The field is required. + * + * @param trafficOrigin + * @return This {@link ResourcesRcsRequirementSpecsRequestApiDoc instance}. + */ + public ResourcesRcsRequirementSpecsRequestApiDoc trafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + return this; + } + + /** + * Returns trafficOrigin. + *

+ * The field is required. + * + * @return trafficOrigin + */ + @JsonProperty("trafficOrigin") + public ResourcesTrafficOrigin getTrafficOrigin() { + return trafficOrigin; + } + + /** + * Sets trafficOrigin. + *

+ * The field is required. + * + * @param trafficOrigin + */ + @JsonProperty("trafficOrigin") + public void setTrafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsRequirementSpecsRequestApiDoc resourcesRcsRequirementSpecsRequestApiDoc = + (ResourcesRcsRequirementSpecsRequestApiDoc) o; + return Objects.equals(this.type, resourcesRcsRequirementSpecsRequestApiDoc.type) + && Objects.equals(this.countryCode, resourcesRcsRequirementSpecsRequestApiDoc.countryCode) + && Objects.equals(this.excludedCarriers, resourcesRcsRequirementSpecsRequestApiDoc.excludedCarriers) + && Objects.equals(this.trafficOrigin, resourcesRcsRequirementSpecsRequestApiDoc.trafficOrigin); + } + + @Override + public int hashCode() { + return Objects.hash(type, countryCode, excludedCarriers, trafficOrigin); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsRequirementSpecsRequestApiDoc {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" excludedCarriers: ") + .append(toIndentedString(excludedCarriers)) + .append(newLine) + .append(" trafficOrigin: ") + .append(toIndentedString(trafficOrigin)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsResourceFilter.java b/src/main/java/com/infobip/model/ResourcesRcsResourceFilter.java new file mode 100644 index 0000000..7eb74af --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsResourceFilter.java @@ -0,0 +1,110 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * RCS filter for resources. + */ +public class ResourcesRcsResourceFilter extends ResourcesIbResourcesFilter { + + private String senderName; + + /** + * Constructs a new {@link ResourcesRcsResourceFilter} instance. + */ + public ResourcesRcsResourceFilter() { + super("RCS_RESOURCE"); + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + * @return This {@link ResourcesRcsResourceFilter instance}. + */ + public ResourcesRcsResourceFilter senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Sender name. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsResourceFilter resourcesRcsResourceFilter = (ResourcesRcsResourceFilter) o; + return Objects.equals(this.senderName, resourcesRcsResourceFilter.senderName) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(senderName, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsResourceFilter {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsResourceInfo.java b/src/main/java/com/infobip/model/ResourcesRcsResourceInfo.java new file mode 100644 index 0000000..d72f8f1 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsResourceInfo.java @@ -0,0 +1,294 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about RCS type of resource. + */ +public class ResourcesRcsResourceInfo implements ResourcesIbResourceInfo { + + private String senderName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + * @return This {@link ResourcesRcsResourceInfo instance}. + */ + public ResourcesRcsResourceInfo senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Sender name. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesRcsResourceInfo instance}. + */ + public ResourcesRcsResourceInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesRcsResourceInfo instance}. + */ + public ResourcesRcsResourceInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + * @return This {@link ResourcesRcsResourceInfo instance}. + */ + public ResourcesRcsResourceInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesRcsResourceInfo instance}. + */ + public ResourcesRcsResourceInfo addCapabilitiesItem(ResourcesResourceCapabilityChannel capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesRcsResourceInfo instance}. + */ + public ResourcesRcsResourceInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsResourceInfo resourcesRcsResourceInfo = (ResourcesRcsResourceInfo) o; + return Objects.equals(this.senderName, resourcesRcsResourceInfo.senderName) + && Objects.equals(this.countryCode, resourcesRcsResourceInfo.countryCode) + && Objects.equals(this.countryName, resourcesRcsResourceInfo.countryName) + && Objects.equals(this.capabilities, resourcesRcsResourceInfo.capabilities) + && Objects.equals(this.resourceType, resourcesRcsResourceInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash(senderName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsResourceInfo {") + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderApiDoc.java b/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderApiDoc.java new file mode 100644 index 0000000..8ab0d32 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderApiDoc.java @@ -0,0 +1,798 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents ResourcesRcsSenderResourceOrderApiDoc model. + */ +public class ResourcesRcsSenderResourceOrderApiDoc + implements GetResourceRequest200Response, ResourcesPageResourceOrderApiDocResultsInner { + + private UUID id; + + /** + * Type of resource. + */ + public enum TypeEnum { + RCS_SENDER_LAUNCH("RCS_SENDER_LAUNCH"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private ResourcesResourceOrderStatus status; + + private String countryCode; + + private List excludedCarriers = null; + + private String senderName; + + private String requestedByEmailAddress; + + private List additionalContactEmails = null; + + private OffsetDateTime requestedDate; + + private ResourcesTrafficOrigin trafficOrigin; + + private String note; + + private List requirements = null; + + private List requirementsFeedback = null; + + private Platform platform; + + /** + * Sets id. + *

+ * Field description: + * The ID of the resource. + * + * @param id + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc id(UUID id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The ID of the resource. + * + * @return id + */ + @JsonProperty("id") + public UUID getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The ID of the resource. + * + * @param id + */ + @JsonProperty("id") + public void setId(UUID id) { + this.id = id; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + * + * @param type + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets status. + * + * @param status + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc status(ResourcesResourceOrderStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + * + * @return status + */ + @JsonProperty("status") + public ResourcesResourceOrderStatus getStatus() { + return status; + } + + /** + * Sets status. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(ResourcesResourceOrderStatus status) { + this.status = status; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @param countryCode + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriers + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc excludedCarriers(List excludedCarriers) { + this.excludedCarriers = excludedCarriers; + return this; + } + + /** + * Adds and item into excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriersItem The item to be added to the list. + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc addExcludedCarriersItem(String excludedCarriersItem) { + if (this.excludedCarriers == null) { + this.excludedCarriers = new ArrayList<>(); + } + this.excludedCarriers.add(excludedCarriersItem); + return this; + } + + /** + * Returns excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @return excludedCarriers + */ + @JsonProperty("excludedCarriers") + public List getExcludedCarriers() { + return excludedCarriers; + } + + /** + * Sets excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriers + */ + @JsonProperty("excludedCarriers") + public void setExcludedCarriers(List excludedCarriers) { + this.excludedCarriers = excludedCarriers; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Sender name. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @param requestedByEmailAddress + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc requestedByEmailAddress(String requestedByEmailAddress) { + this.requestedByEmailAddress = requestedByEmailAddress; + return this; + } + + /** + * Returns requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @return requestedByEmailAddress + */ + @JsonProperty("requestedByEmailAddress") + public String getRequestedByEmailAddress() { + return requestedByEmailAddress; + } + + /** + * Sets requestedByEmailAddress. + *

+ * Field description: + * Email address of the requester. + * + * @param requestedByEmailAddress + */ + @JsonProperty("requestedByEmailAddress") + public void setRequestedByEmailAddress(String requestedByEmailAddress) { + this.requestedByEmailAddress = requestedByEmailAddress; + } + + /** + * Sets additionalContactEmails. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmails + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc additionalContactEmails(List additionalContactEmails) { + this.additionalContactEmails = additionalContactEmails; + return this; + } + + /** + * Adds and item into additionalContactEmails. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmailsItem The item to be added to the list. + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc addAdditionalContactEmailsItem(String additionalContactEmailsItem) { + if (this.additionalContactEmails == null) { + this.additionalContactEmails = new ArrayList<>(); + } + this.additionalContactEmails.add(additionalContactEmailsItem); + return this; + } + + /** + * Returns additionalContactEmails. + *

+ * Field description: + * Additional email addresses. + * + * @return additionalContactEmails + */ + @JsonProperty("additionalContactEmails") + public List getAdditionalContactEmails() { + return additionalContactEmails; + } + + /** + * Sets additionalContactEmails. + *

+ * Field description: + * Additional email addresses. + * + * @param additionalContactEmails + */ + @JsonProperty("additionalContactEmails") + public void setAdditionalContactEmails(List additionalContactEmails) { + this.additionalContactEmails = additionalContactEmails; + } + + /** + * Sets requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @param requestedDate + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc requestedDate(OffsetDateTime requestedDate) { + this.requestedDate = requestedDate; + return this; + } + + /** + * Returns requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @return requestedDate + */ + @JsonProperty("requestedDate") + public OffsetDateTime getRequestedDate() { + return requestedDate; + } + + /** + * Sets requestedDate. + *

+ * Field description: + * Date and time the resource was requested. + * + * @param requestedDate + */ + @JsonProperty("requestedDate") + public void setRequestedDate(OffsetDateTime requestedDate) { + this.requestedDate = requestedDate; + } + + /** + * Sets trafficOrigin. + * + * @param trafficOrigin + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc trafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + return this; + } + + /** + * Returns trafficOrigin. + * + * @return trafficOrigin + */ + @JsonProperty("trafficOrigin") + public ResourcesTrafficOrigin getTrafficOrigin() { + return trafficOrigin; + } + + /** + * Sets trafficOrigin. + * + * @param trafficOrigin + */ + @JsonProperty("trafficOrigin") + public void setTrafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc note(String note) { + this.note = note; + return this; + } + + /** + * Returns note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @return note + */ + @JsonProperty("note") + public String getNote() { + return note; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + */ + @JsonProperty("note") + public void setNote(String note) { + this.note = note; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirements + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc requirements(List requirements) { + this.requirements = requirements; + return this; + } + + /** + * Adds and item into requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirementsItem The item to be added to the list. + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc addRequirementsItem(ResourcesFilledRequirement requirementsItem) { + if (this.requirements == null) { + this.requirements = new ArrayList<>(); + } + this.requirements.add(requirementsItem); + return this; + } + + /** + * Returns requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @return requirements + */ + @JsonProperty("requirements") + public List getRequirements() { + return requirements; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + * + * @param requirements + */ + @JsonProperty("requirements") + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedback + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc requirementsFeedback( + List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + return this; + } + + /** + * Adds and item into requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedbackItem The item to be added to the list. + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc addRequirementsFeedbackItem( + ResourcesFilledRequirementFeedback requirementsFeedbackItem) { + if (this.requirementsFeedback == null) { + this.requirementsFeedback = new ArrayList<>(); + } + this.requirementsFeedback.add(requirementsFeedbackItem); + return this; + } + + /** + * Returns requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @return requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public List getRequirementsFeedback() { + return requirementsFeedback; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * List of feedback for requirements. + * + * @param requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public void setRequirementsFeedback(List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesRcsSenderResourceOrderApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderApiDoc platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsSenderResourceOrderApiDoc resourcesRcsSenderResourceOrderApiDoc = + (ResourcesRcsSenderResourceOrderApiDoc) o; + return Objects.equals(this.id, resourcesRcsSenderResourceOrderApiDoc.id) + && Objects.equals(this.type, resourcesRcsSenderResourceOrderApiDoc.type) + && Objects.equals(this.status, resourcesRcsSenderResourceOrderApiDoc.status) + && Objects.equals(this.countryCode, resourcesRcsSenderResourceOrderApiDoc.countryCode) + && Objects.equals(this.excludedCarriers, resourcesRcsSenderResourceOrderApiDoc.excludedCarriers) + && Objects.equals(this.senderName, resourcesRcsSenderResourceOrderApiDoc.senderName) + && Objects.equals( + this.requestedByEmailAddress, resourcesRcsSenderResourceOrderApiDoc.requestedByEmailAddress) + && Objects.equals( + this.additionalContactEmails, resourcesRcsSenderResourceOrderApiDoc.additionalContactEmails) + && Objects.equals(this.requestedDate, resourcesRcsSenderResourceOrderApiDoc.requestedDate) + && Objects.equals(this.trafficOrigin, resourcesRcsSenderResourceOrderApiDoc.trafficOrigin) + && Objects.equals(this.note, resourcesRcsSenderResourceOrderApiDoc.note) + && Objects.equals(this.requirements, resourcesRcsSenderResourceOrderApiDoc.requirements) + && Objects.equals(this.requirementsFeedback, resourcesRcsSenderResourceOrderApiDoc.requirementsFeedback) + && Objects.equals(this.platform, resourcesRcsSenderResourceOrderApiDoc.platform); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + type, + status, + countryCode, + excludedCarriers, + senderName, + requestedByEmailAddress, + additionalContactEmails, + requestedDate, + trafficOrigin, + note, + requirements, + requirementsFeedback, + platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsSenderResourceOrderApiDoc {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" excludedCarriers: ") + .append(toIndentedString(excludedCarriers)) + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" requestedByEmailAddress: ") + .append(toIndentedString(requestedByEmailAddress)) + .append(newLine) + .append(" additionalContactEmails: ") + .append(toIndentedString(additionalContactEmails)) + .append(newLine) + .append(" requestedDate: ") + .append(toIndentedString(requestedDate)) + .append(newLine) + .append(" trafficOrigin: ") + .append(toIndentedString(trafficOrigin)) + .append(newLine) + .append(" note: ") + .append(toIndentedString(note)) + .append(newLine) + .append(" requirements: ") + .append(toIndentedString(requirements)) + .append(newLine) + .append(" requirementsFeedback: ") + .append(toIndentedString(requirementsFeedback)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderRequestApiDoc.java b/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderRequestApiDoc.java new file mode 100644 index 0000000..7f2a5d4 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderRequestApiDoc.java @@ -0,0 +1,536 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesRcsSenderResourceOrderRequestApiDoc model. + */ +public class ResourcesRcsSenderResourceOrderRequestApiDoc implements ResourcesSubmitResourceRequestBody { + /** + * Type of resource. + */ + public enum TypeEnum { + RCS_SENDER_LAUNCH("RCS_SENDER_LAUNCH"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum enumElement : TypeEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private TypeEnum type; + + private String senderName; + + private List additionalContactEmails = null; + + private String countryCode; + + private List excludedCarriers = null; + + private ResourcesTrafficOrigin trafficOrigin; + + private List requirements = new ArrayList<>(); + + private Platform platform; + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + /** + * Sets type. + *

+ * Field description: + * Type of resource. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + *

+ * The field is required. + * + * @param senderName + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc senderName(String senderName) { + this.senderName = senderName; + return this; + } + + /** + * Returns senderName. + *

+ * Field description: + * Sender name. + *

+ * The field is required. + * + * @return senderName + */ + @JsonProperty("senderName") + public String getSenderName() { + return senderName; + } + + /** + * Sets senderName. + *

+ * Field description: + * Sender name. + *

+ * The field is required. + * + * @param senderName + */ + @JsonProperty("senderName") + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + /** + * Sets additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmails + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc additionalContactEmails(List additionalContactEmails) { + this.additionalContactEmails = additionalContactEmails; + return this; + } + + /** + * Adds and item into additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmailsItem The item to be added to the list. + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc addAdditionalContactEmailsItem( + String additionalContactEmailsItem) { + if (this.additionalContactEmails == null) { + this.additionalContactEmails = new ArrayList<>(); + } + this.additionalContactEmails.add(additionalContactEmailsItem); + return this; + } + + /** + * Returns additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @return additionalContactEmails + */ + @JsonProperty("additionalContactEmails") + public List getAdditionalContactEmails() { + return additionalContactEmails; + } + + /** + * Sets additionalContactEmails. + *

+ * Field description: + * Email addresses that would be contacted by Infobip support team for any request related matter. + * + * @param additionalContactEmails + */ + @JsonProperty("additionalContactEmails") + public void setAdditionalContactEmails(List additionalContactEmails) { + this.additionalContactEmails = additionalContactEmails; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriers + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc excludedCarriers(List excludedCarriers) { + this.excludedCarriers = excludedCarriers; + return this; + } + + /** + * Adds and item into excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriersItem The item to be added to the list. + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc addExcludedCarriersItem(String excludedCarriersItem) { + if (this.excludedCarriers == null) { + this.excludedCarriers = new ArrayList<>(); + } + this.excludedCarriers.add(excludedCarriersItem); + return this; + } + + /** + * Returns excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @return excludedCarriers + */ + @JsonProperty("excludedCarriers") + public List getExcludedCarriers() { + return excludedCarriers; + } + + /** + * Sets excludedCarriers. + *

+ * Field description: + * List of carrier names excluded from the sender launch. + * + * @param excludedCarriers + */ + @JsonProperty("excludedCarriers") + public void setExcludedCarriers(List excludedCarriers) { + this.excludedCarriers = excludedCarriers; + } + + /** + * Sets trafficOrigin. + *

+ * The field is required. + * + * @param trafficOrigin + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc trafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + return this; + } + + /** + * Returns trafficOrigin. + *

+ * The field is required. + * + * @return trafficOrigin + */ + @JsonProperty("trafficOrigin") + public ResourcesTrafficOrigin getTrafficOrigin() { + return trafficOrigin; + } + + /** + * Sets trafficOrigin. + *

+ * The field is required. + * + * @param trafficOrigin + */ + @JsonProperty("trafficOrigin") + public void setTrafficOrigin(ResourcesTrafficOrigin trafficOrigin) { + this.trafficOrigin = trafficOrigin; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirements + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc requirements(List requirements) { + this.requirements = requirements; + return this; + } + + /** + * Adds and item into requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirementsItem The item to be added to the list. + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc addRequirementsItem( + ResourcesFilledRequirement requirementsItem) { + if (this.requirements == null) { + this.requirements = new ArrayList<>(); + } + this.requirements.add(requirementsItem); + return this; + } + + /** + * Returns requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @return requirements + */ + @JsonProperty("requirements") + public List getRequirements() { + return requirements; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirements + */ + @JsonProperty("requirements") + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesRcsSenderResourceOrderRequestApiDoc instance}. + */ + public ResourcesRcsSenderResourceOrderRequestApiDoc platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsSenderResourceOrderRequestApiDoc resourcesRcsSenderResourceOrderRequestApiDoc = + (ResourcesRcsSenderResourceOrderRequestApiDoc) o; + return Objects.equals(this.type, resourcesRcsSenderResourceOrderRequestApiDoc.type) + && Objects.equals(this.senderName, resourcesRcsSenderResourceOrderRequestApiDoc.senderName) + && Objects.equals( + this.additionalContactEmails, + resourcesRcsSenderResourceOrderRequestApiDoc.additionalContactEmails) + && Objects.equals(this.countryCode, resourcesRcsSenderResourceOrderRequestApiDoc.countryCode) + && Objects.equals(this.excludedCarriers, resourcesRcsSenderResourceOrderRequestApiDoc.excludedCarriers) + && Objects.equals(this.trafficOrigin, resourcesRcsSenderResourceOrderRequestApiDoc.trafficOrigin) + && Objects.equals(this.requirements, resourcesRcsSenderResourceOrderRequestApiDoc.requirements) + && Objects.equals(this.platform, resourcesRcsSenderResourceOrderRequestApiDoc.platform); + } + + @Override + public int hashCode() { + return Objects.hash( + type, + senderName, + additionalContactEmails, + countryCode, + excludedCarriers, + trafficOrigin, + requirements, + platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsSenderResourceOrderRequestApiDoc {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" senderName: ") + .append(toIndentedString(senderName)) + .append(newLine) + .append(" additionalContactEmails: ") + .append(toIndentedString(additionalContactEmails)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" excludedCarriers: ") + .append(toIndentedString(excludedCarriers)) + .append(newLine) + .append(" trafficOrigin: ") + .append(toIndentedString(trafficOrigin)) + .append(newLine) + .append(" requirements: ") + .append(toIndentedString(requirements)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRcsWebhookNotifApiDoc.java b/src/main/java/com/infobip/model/ResourcesRcsWebhookNotifApiDoc.java new file mode 100644 index 0000000..83b45bc --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRcsWebhookNotifApiDoc.java @@ -0,0 +1,346 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesRcsWebhookNotifApiDoc model. + */ +public class ResourcesRcsWebhookNotifApiDoc implements ResourcesWebhookNotifApiDocResultContent { + + private String id; + + /** + * Status of the resource request. + */ + public enum StatusEnum { + UPDATE_REQUESTED("UPDATE_REQUESTED"), + UPDATE_REQUESTED_BY_INTERNAL_REVIEWER("UPDATE_REQUESTED_BY_INTERNAL_REVIEWER"), + REJECTED("REJECTED"), + COMPLETED("COMPLETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum enumElement : StatusEnum.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } + } + + private StatusEnum status; + + private List requirementsFeedback = null; + + private String note; + + private ResourcesWebhookNotifContentType type; + + /** + * Sets id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @param id + * @return This {@link ResourcesRcsWebhookNotifApiDoc instance}. + */ + public ResourcesRcsWebhookNotifApiDoc id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * ID of the resource request. + *

+ * The field is required. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + /** + * Sets status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @param status + * @return This {@link ResourcesRcsWebhookNotifApiDoc instance}. + */ + public ResourcesRcsWebhookNotifApiDoc status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Returns status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @return status + */ + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + /** + * Sets status. + *

+ * Field description: + * Status of the resource request. + *

+ * The field is required. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(StatusEnum status) { + this.status = status; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedback + * @return This {@link ResourcesRcsWebhookNotifApiDoc instance}. + */ + public ResourcesRcsWebhookNotifApiDoc requirementsFeedback( + List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + return this; + } + + /** + * Adds and item into requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedbackItem The item to be added to the list. + * @return This {@link ResourcesRcsWebhookNotifApiDoc instance}. + */ + public ResourcesRcsWebhookNotifApiDoc addRequirementsFeedbackItem( + ResourcesFilledRequirementFeedbackApiDoc requirementsFeedbackItem) { + if (this.requirementsFeedback == null) { + this.requirementsFeedback = new ArrayList<>(); + } + this.requirementsFeedback.add(requirementsFeedbackItem); + return this; + } + + /** + * Returns requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @return requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public List getRequirementsFeedback() { + return requirementsFeedback; + } + + /** + * Sets requirementsFeedback. + *

+ * Field description: + * Feedback for requirements. Present only for UPDATE_REQUESTED and UPDATE_REQUESTED_BY_INTERNAL_REVIEWER statuses. + * + * @param requirementsFeedback + */ + @JsonProperty("requirementsFeedback") + public void setRequirementsFeedback(List requirementsFeedback) { + this.requirementsFeedback = requirementsFeedback; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + * @return This {@link ResourcesRcsWebhookNotifApiDoc instance}. + */ + public ResourcesRcsWebhookNotifApiDoc note(String note) { + this.note = note; + return this; + } + + /** + * Returns note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @return note + */ + @JsonProperty("note") + public String getNote() { + return note; + } + + /** + * Sets note. + *

+ * Field description: + * A note containing extra data about the request. + * + * @param note + */ + @JsonProperty("note") + public void setNote(String note) { + this.note = note; + } + + /** + * Sets type. + * + * @param type + * @return This {@link ResourcesRcsWebhookNotifApiDoc instance}. + */ + public ResourcesRcsWebhookNotifApiDoc type(ResourcesWebhookNotifContentType type) { + this.type = type; + return this; + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public ResourcesWebhookNotifContentType getType() { + return type; + } + + /** + * Sets type. + * + * @param type + */ + @JsonProperty("type") + public void setType(ResourcesWebhookNotifContentType type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRcsWebhookNotifApiDoc resourcesRcsWebhookNotifApiDoc = (ResourcesRcsWebhookNotifApiDoc) o; + return Objects.equals(this.id, resourcesRcsWebhookNotifApiDoc.id) + && Objects.equals(this.status, resourcesRcsWebhookNotifApiDoc.status) + && Objects.equals(this.requirementsFeedback, resourcesRcsWebhookNotifApiDoc.requirementsFeedback) + && Objects.equals(this.note, resourcesRcsWebhookNotifApiDoc.note) + && Objects.equals(this.type, resourcesRcsWebhookNotifApiDoc.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, requirementsFeedback, note, type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRcsWebhookNotifApiDoc {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" requirementsFeedback: ") + .append(toIndentedString(requirementsFeedback)) + .append(newLine) + .append(" note: ") + .append(toIndentedString(note)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRequirementSpec.java b/src/main/java/com/infobip/model/ResourcesRequirementSpec.java new file mode 100644 index 0000000..45e2760 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRequirementSpec.java @@ -0,0 +1,92 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * List of requirements needed for the resource request. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesDocumentRequirementSpec.class, name = "DOCUMENT"), + @JsonSubTypes.Type(value = ResourcesEmailRequirementSpec.class, name = "EMAIL"), + @JsonSubTypes.Type(value = ResourcesGsmRequirementSpec.class, name = "GSM"), + @JsonSubTypes.Type(value = ResourcesIntegerRequirementSpec.class, name = "INTEGER"), + @JsonSubTypes.Type(value = ResourcesTextRequirementSpec.class, name = "TEXT"), + @JsonSubTypes.Type(value = ResourcesUrlRequirementSpec.class, name = "URL"), +}) +public abstract class ResourcesRequirementSpec { + + protected final ResourcesFieldType type; + + /** + * Constructs a new {@link ResourcesRequirementSpec} instance. + */ + public ResourcesRequirementSpec(String type) { + this.type = ResourcesFieldType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public ResourcesFieldType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRequirementSpec resourcesRequirementSpec = (ResourcesRequirementSpec) o; + return Objects.equals(this.type, resourcesRequirementSpec.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRequirementSpec {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRequirementSpecs.java b/src/main/java/com/infobip/model/ResourcesRequirementSpecs.java new file mode 100644 index 0000000..e5b02fe --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRequirementSpecs.java @@ -0,0 +1,119 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesRequirementSpecs model. + */ +public class ResourcesRequirementSpecs { + + private List requirements = null; + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements needed for the resource request. + * + * @param requirements + * @return This {@link ResourcesRequirementSpecs instance}. + */ + public ResourcesRequirementSpecs requirements(List requirements) { + this.requirements = requirements; + return this; + } + + /** + * Adds and item into requirements. + *

+ * Field description: + * List of requirements needed for the resource request. + * + * @param requirementsItem The item to be added to the list. + * @return This {@link ResourcesRequirementSpecs instance}. + */ + public ResourcesRequirementSpecs addRequirementsItem(ResourcesRequirementSpec requirementsItem) { + if (this.requirements == null) { + this.requirements = new ArrayList<>(); + } + this.requirements.add(requirementsItem); + return this; + } + + /** + * Returns requirements. + *

+ * Field description: + * List of requirements needed for the resource request. + * + * @return requirements + */ + @JsonProperty("requirements") + public List getRequirements() { + return requirements; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements needed for the resource request. + * + * @param requirements + */ + @JsonProperty("requirements") + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesRequirementSpecs resourcesRequirementSpecs = (ResourcesRequirementSpecs) o; + return Objects.equals(this.requirements, resourcesRequirementSpecs.requirements); + } + + @Override + public int hashCode() { + return Objects.hash(requirements); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesRequirementSpecs {") + .append(newLine) + .append(" requirements: ") + .append(toIndentedString(requirements)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesRequirementsLookupBody.java b/src/main/java/com/infobip/model/ResourcesRequirementsLookupBody.java new file mode 100644 index 0000000..f48c337 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesRequirementsLookupBody.java @@ -0,0 +1,21 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaRequirementSpecsRequestApiDoc.class), + @JsonSubTypes.Type(value = ResourcesNumberRequirementSpecsRequestApiDoc.class), + @JsonSubTypes.Type(value = ResourcesRcsRequirementSpecsRequestApiDoc.class) +}) +public interface ResourcesRequirementsLookupBody {} diff --git a/src/main/java/com/infobip/model/ResourcesResourceCapabilityChannel.java b/src/main/java/com/infobip/model/ResourcesResourceCapabilityChannel.java new file mode 100644 index 0000000..93bc340 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesResourceCapabilityChannel.java @@ -0,0 +1,57 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Indicates the channel supported by the resource. + */ +public enum ResourcesResourceCapabilityChannel { + SMS("SMS"), + MMS("MMS"), + RCS("RCS"), + VIBER_BM("VIBER_BM"), + VIBER_BOT("VIBER_BOT"), + APPLE_MB("APPLE_MB"), + OPEN_CHANNEL("OPEN_CHANNEL"), + KAKAO_CHINGU("KAKAO_CHINGU"), + KAKAO_ALIM("KAKAO_ALIM"), + KAKAO_SANGDAM("KAKAO_SANGDAM"), + FACEBOOK_POSTS("FACEBOOK_POSTS"), + MESSENGER("MESSENGER"); + + private final String value; + + ResourcesResourceCapabilityChannel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesResourceCapabilityChannel fromValue(String value) { + for (ResourcesResourceCapabilityChannel enumElement : ResourcesResourceCapabilityChannel.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesResourceNumberCapability.java b/src/main/java/com/infobip/model/ResourcesResourceNumberCapability.java new file mode 100644 index 0000000..3f9791e --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesResourceNumberCapability.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Capabilities of the numbers. + */ +public enum ResourcesResourceNumberCapability { + SMS("SMS"), + VOICE("VOICE"), + MMS("MMS"); + + private final String value; + + ResourcesResourceNumberCapability(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesResourceNumberCapability fromValue(String value) { + for (ResourcesResourceNumberCapability enumElement : ResourcesResourceNumberCapability.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesResourceNumberType.java b/src/main/java/com/infobip/model/ResourcesResourceNumberType.java new file mode 100644 index 0000000..8ea86c8 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesResourceNumberType.java @@ -0,0 +1,49 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of numbers. + */ +public enum ResourcesResourceNumberType { + SHORT_CODE("SHORT_CODE"), + VIRTUAL_LONG_NUMBER("VIRTUAL_LONG_NUMBER"), + TEN_DIGIT_LONG_CODE("TEN_DIGIT_LONG_CODE"), + TOLL_FREE_NUMBER("TOLL_FREE_NUMBER"); + + private final String value; + + ResourcesResourceNumberType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesResourceNumberType fromValue(String value) { + for (ResourcesResourceNumberType enumElement : ResourcesResourceNumberType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesResourceOrderIdentifier.java b/src/main/java/com/infobip/model/ResourcesResourceOrderIdentifier.java new file mode 100644 index 0000000..5239f6a --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesResourceOrderIdentifier.java @@ -0,0 +1,101 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; +import java.util.UUID; + +/** + * Represents ResourcesResourceOrderIdentifier model. + */ +public class ResourcesResourceOrderIdentifier { + + private UUID id; + + /** + * Sets id. + *

+ * Field description: + * The ID of the resource request. + * + * @param id + * @return This {@link ResourcesResourceOrderIdentifier instance}. + */ + public ResourcesResourceOrderIdentifier id(UUID id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * The ID of the resource request. + * + * @return id + */ + @JsonProperty("id") + public UUID getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * The ID of the resource request. + * + * @param id + */ + @JsonProperty("id") + public void setId(UUID id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesResourceOrderIdentifier resourcesResourceOrderIdentifier = (ResourcesResourceOrderIdentifier) o; + return Objects.equals(this.id, resourcesResourceOrderIdentifier.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesResourceOrderIdentifier {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesResourceOrderStatus.java b/src/main/java/com/infobip/model/ResourcesResourceOrderStatus.java new file mode 100644 index 0000000..2aa2bb9 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesResourceOrderStatus.java @@ -0,0 +1,55 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Current status of the resource request. + */ +public enum ResourcesResourceOrderStatus { + PENDING("PENDING"), + UPDATE_REQUESTED_BY_INTERNAL_REVIEWER("UPDATE_REQUESTED_BY_INTERNAL_REVIEWER"), + CANCELED("CANCELED"), + AUTOMATIC_VALIDATION("AUTOMATIC_VALIDATION"), + UPDATE_REQUESTED("UPDATE_REQUESTED"), + REJECTED("REJECTED"), + COMPLETED("COMPLETED"), + PENDING_REVIEW("PENDING_REVIEW"), + IN_REVIEW("IN_REVIEW"), + IN_PROGRESS("IN_PROGRESS"); + + private final String value; + + ResourcesResourceOrderStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesResourceOrderStatus fromValue(String value) { + for (ResourcesResourceOrderStatus enumElement : ResourcesResourceOrderStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesSmppForwardActionDocs.java b/src/main/java/com/infobip/model/ResourcesSmppForwardActionDocs.java new file mode 100644 index 0000000..e592df6 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesSmppForwardActionDocs.java @@ -0,0 +1,110 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesSmppForwardActionDocs model. + */ +public class ResourcesSmppForwardActionDocs extends ResourcesMoActionDocs { + + private String description; + + /** + * Constructs a new {@link ResourcesSmppForwardActionDocs} instance. + */ + public ResourcesSmppForwardActionDocs() { + super("SMPP_FORWARD"); + } + + /** + * Sets description. + *

+ * Field description: + * Additional action description. + * + * @param description + * @return This {@link ResourcesSmppForwardActionDocs instance}. + */ + public ResourcesSmppForwardActionDocs description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Additional action description. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Additional action description. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesSmppForwardActionDocs resourcesSmppForwardActionDocs = (ResourcesSmppForwardActionDocs) o; + return Objects.equals(this.description, resourcesSmppForwardActionDocs.description) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(description, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesSmppForwardActionDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesSmsMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesSmsMoConfigurationRequest.java new file mode 100644 index 0000000..c3f5c41 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesSmsMoConfigurationRequest.java @@ -0,0 +1,399 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * SMS configuration request. + */ +public class ResourcesSmsMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String numberKey; + + private ResourcesPlatformDocs platform; + + private String number; + + private String countryCode; + + private ResourcesMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + private ResourcesAutoResponseActionRequest autoResponse; + + private ResourcesBlockListConfigurationRequest blockListConfiguration; + + /** + * Constructs a new {@link ResourcesSmsMoConfigurationRequest} instance. + */ + public ResourcesSmsMoConfigurationRequest() { + super("SMS"); + } + + /** + * Sets numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @param numberKey + * @return This {@link ResourcesSmsMoConfigurationRequest instance}. + */ + public ResourcesSmsMoConfigurationRequest numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesSmsMoConfigurationRequest instance}. + */ + public ResourcesSmsMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @param number + * @return This {@link ResourcesSmsMoConfigurationRequest instance}. + */ + public ResourcesSmsMoConfigurationRequest number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesSmsMoConfigurationRequest instance}. + */ + public ResourcesSmsMoConfigurationRequest countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesSmsMoConfigurationRequest instance}. + */ + public ResourcesSmsMoConfigurationRequest forwarding(ResourcesMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesSmsMoConfigurationRequest instance}. + */ + public ResourcesSmsMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + * @return This {@link ResourcesSmsMoConfigurationRequest instance}. + */ + public ResourcesSmsMoConfigurationRequest autoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + return this; + } + + /** + * Returns autoResponse. + * + * @return autoResponse + */ + @JsonProperty("autoResponse") + public ResourcesAutoResponseActionRequest getAutoResponse() { + return autoResponse; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + */ + @JsonProperty("autoResponse") + public void setAutoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + * @return This {@link ResourcesSmsMoConfigurationRequest instance}. + */ + public ResourcesSmsMoConfigurationRequest blockListConfiguration( + ResourcesBlockListConfigurationRequest blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + return this; + } + + /** + * Returns blockListConfiguration. + * + * @return blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public ResourcesBlockListConfigurationRequest getBlockListConfiguration() { + return blockListConfiguration; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public void setBlockListConfiguration(ResourcesBlockListConfigurationRequest blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesSmsMoConfigurationRequest resourcesSmsMoConfigurationRequest = (ResourcesSmsMoConfigurationRequest) o; + return Objects.equals(this.numberKey, resourcesSmsMoConfigurationRequest.numberKey) + && Objects.equals(this.platform, resourcesSmsMoConfigurationRequest.platform) + && Objects.equals(this.number, resourcesSmsMoConfigurationRequest.number) + && Objects.equals(this.countryCode, resourcesSmsMoConfigurationRequest.countryCode) + && Objects.equals(this.forwarding, resourcesSmsMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesSmsMoConfigurationRequest.conversations) + && Objects.equals(this.autoResponse, resourcesSmsMoConfigurationRequest.autoResponse) + && Objects.equals( + this.blockListConfiguration, resourcesSmsMoConfigurationRequest.blockListConfiguration) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + numberKey, + platform, + number, + countryCode, + forwarding, + conversations, + autoResponse, + blockListConfiguration, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesSmsMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append(" autoResponse: ") + .append(toIndentedString(autoResponse)) + .append(newLine) + .append(" blockListConfiguration: ") + .append(toIndentedString(blockListConfiguration)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesSubmitResourceRequestBody.java b/src/main/java/com/infobip/model/ResourcesSubmitResourceRequestBody.java new file mode 100644 index 0000000..915fe86 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesSubmitResourceRequestBody.java @@ -0,0 +1,21 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaResourceOrderRequestApiDoc.class), + @JsonSubTypes.Type(value = ResourcesNumberResourceOrderRequestApiDoc.class), + @JsonSubTypes.Type(value = ResourcesRcsSenderResourceOrderRequestApiDoc.class) +}) +public interface ResourcesSubmitResourceRequestBody {} diff --git a/src/main/java/com/infobip/model/ResourcesTelegramMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesTelegramMoConfigurationRequest.java new file mode 100644 index 0000000..d9975b2 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesTelegramMoConfigurationRequest.java @@ -0,0 +1,195 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesTelegramMoConfigurationRequest model. + */ +public class ResourcesTelegramMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private String resource; + + private ResourcesUseConversations conversations; + + /** + * Constructs a new {@link ResourcesTelegramMoConfigurationRequest} instance. + */ + public ResourcesTelegramMoConfigurationRequest() { + super("TELEGRAM"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesTelegramMoConfigurationRequest instance}. + */ + public ResourcesTelegramMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesTelegramMoConfigurationRequest instance}. + */ + public ResourcesTelegramMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesTelegramMoConfigurationRequest instance}. + */ + public ResourcesTelegramMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesTelegramMoConfigurationRequest resourcesTelegramMoConfigurationRequest = + (ResourcesTelegramMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesTelegramMoConfigurationRequest.resourceKey) + && Objects.equals(this.resource, resourcesTelegramMoConfigurationRequest.resource) + && Objects.equals(this.conversations, resourcesTelegramMoConfigurationRequest.conversations) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, resource, conversations, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesTelegramMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesTextRequirementSpec.java b/src/main/java/com/infobip/model/ResourcesTextRequirementSpec.java new file mode 100644 index 0000000..7d31d50 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesTextRequirementSpec.java @@ -0,0 +1,443 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesTextRequirementSpec model. + */ +public class ResourcesTextRequirementSpec extends ResourcesRequirementSpec { + + private String key; + + private String name; + + private String description; + + private Boolean required; + + private Boolean multipleValuesSupported; + + private ResourcesCategory category; + + private List options = null; + + private ResourcesTextRequirementValidation validation; + + /** + * Constructs a new {@link ResourcesTextRequirementSpec} instance. + */ + public ResourcesTextRequirementSpec() { + super("TEXT"); + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * Key of the requirement. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * Name of the requirement. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Description of the requirement. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec required(Boolean required) { + this.required = required; + return this; + } + + /** + * Returns required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @return required + */ + @JsonProperty("required") + public Boolean getRequired() { + return required; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + */ + @JsonProperty("required") + public void setRequired(Boolean required) { + this.required = required; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec multipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + return this; + } + + /** + * Returns multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @return multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public Boolean getMultipleValuesSupported() { + return multipleValuesSupported; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public void setMultipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + } + + /** + * Sets category. + * + * @param category + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec category(ResourcesCategory category) { + this.category = category; + return this; + } + + /** + * Returns category. + * + * @return category + */ + @JsonProperty("category") + public ResourcesCategory getCategory() { + return category; + } + + /** + * Sets category. + * + * @param category + */ + @JsonProperty("category") + public void setCategory(ResourcesCategory category) { + this.category = category; + } + + /** + * Sets options. + *

+ * Field description: + * List of options for the requirement. + * + * @param options + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec options(List options) { + this.options = options; + return this; + } + + /** + * Adds and item into options. + *

+ * Field description: + * List of options for the requirement. + * + * @param optionsItem The item to be added to the list. + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec addOptionsItem(String optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Returns options. + *

+ * Field description: + * List of options for the requirement. + * + * @return options + */ + @JsonProperty("options") + public List getOptions() { + return options; + } + + /** + * Sets options. + *

+ * Field description: + * List of options for the requirement. + * + * @param options + */ + @JsonProperty("options") + public void setOptions(List options) { + this.options = options; + } + + /** + * Sets validation. + * + * @param validation + * @return This {@link ResourcesTextRequirementSpec instance}. + */ + public ResourcesTextRequirementSpec validation(ResourcesTextRequirementValidation validation) { + this.validation = validation; + return this; + } + + /** + * Returns validation. + * + * @return validation + */ + @JsonProperty("validation") + public ResourcesTextRequirementValidation getValidation() { + return validation; + } + + /** + * Sets validation. + * + * @param validation + */ + @JsonProperty("validation") + public void setValidation(ResourcesTextRequirementValidation validation) { + this.validation = validation; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesTextRequirementSpec resourcesTextRequirementSpec = (ResourcesTextRequirementSpec) o; + return Objects.equals(this.key, resourcesTextRequirementSpec.key) + && Objects.equals(this.name, resourcesTextRequirementSpec.name) + && Objects.equals(this.description, resourcesTextRequirementSpec.description) + && Objects.equals(this.required, resourcesTextRequirementSpec.required) + && Objects.equals(this.multipleValuesSupported, resourcesTextRequirementSpec.multipleValuesSupported) + && Objects.equals(this.category, resourcesTextRequirementSpec.category) + && Objects.equals(this.options, resourcesTextRequirementSpec.options) + && Objects.equals(this.validation, resourcesTextRequirementSpec.validation) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + name, + description, + required, + multipleValuesSupported, + category, + options, + validation, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesTextRequirementSpec {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" required: ") + .append(toIndentedString(required)) + .append(newLine) + .append(" multipleValuesSupported: ") + .append(toIndentedString(multipleValuesSupported)) + .append(newLine) + .append(" category: ") + .append(toIndentedString(category)) + .append(newLine) + .append(" options: ") + .append(toIndentedString(options)) + .append(newLine) + .append(" validation: ") + .append(toIndentedString(validation)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesTextRequirementValidation.java b/src/main/java/com/infobip/model/ResourcesTextRequirementValidation.java new file mode 100644 index 0000000..336096b --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesTextRequirementValidation.java @@ -0,0 +1,192 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Validation rules. + */ +public class ResourcesTextRequirementValidation { + + private Integer minLength; + + private Integer maxLength; + + private String pattern; + + /** + * Sets minLength. + *

+ * Field description: + * The minimum length of the text. + * + * @param minLength + * @return This {@link ResourcesTextRequirementValidation instance}. + */ + public ResourcesTextRequirementValidation minLength(Integer minLength) { + this.minLength = minLength; + return this; + } + + /** + * Returns minLength. + *

+ * Field description: + * The minimum length of the text. + * + * @return minLength + */ + @JsonProperty("minLength") + public Integer getMinLength() { + return minLength; + } + + /** + * Sets minLength. + *

+ * Field description: + * The minimum length of the text. + * + * @param minLength + */ + @JsonProperty("minLength") + public void setMinLength(Integer minLength) { + this.minLength = minLength; + } + + /** + * Sets maxLength. + *

+ * Field description: + * The maximum length of the text. + * + * @param maxLength + * @return This {@link ResourcesTextRequirementValidation instance}. + */ + public ResourcesTextRequirementValidation maxLength(Integer maxLength) { + this.maxLength = maxLength; + return this; + } + + /** + * Returns maxLength. + *

+ * Field description: + * The maximum length of the text. + * + * @return maxLength + */ + @JsonProperty("maxLength") + public Integer getMaxLength() { + return maxLength; + } + + /** + * Sets maxLength. + *

+ * Field description: + * The maximum length of the text. + * + * @param maxLength + */ + @JsonProperty("maxLength") + public void setMaxLength(Integer maxLength) { + this.maxLength = maxLength; + } + + /** + * Sets pattern. + *

+ * Field description: + * The pattern of the text. + * + * @param pattern + * @return This {@link ResourcesTextRequirementValidation instance}. + */ + public ResourcesTextRequirementValidation pattern(String pattern) { + this.pattern = pattern; + return this; + } + + /** + * Returns pattern. + *

+ * Field description: + * The pattern of the text. + * + * @return pattern + */ + @JsonProperty("pattern") + public String getPattern() { + return pattern; + } + + /** + * Sets pattern. + *

+ * Field description: + * The pattern of the text. + * + * @param pattern + */ + @JsonProperty("pattern") + public void setPattern(String pattern) { + this.pattern = pattern; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesTextRequirementValidation resourcesTextRequirementValidation = (ResourcesTextRequirementValidation) o; + return Objects.equals(this.minLength, resourcesTextRequirementValidation.minLength) + && Objects.equals(this.maxLength, resourcesTextRequirementValidation.maxLength) + && Objects.equals(this.pattern, resourcesTextRequirementValidation.pattern); + } + + @Override + public int hashCode() { + return Objects.hash(minLength, maxLength, pattern); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesTextRequirementValidation {") + .append(newLine) + .append(" minLength: ") + .append(toIndentedString(minLength)) + .append(newLine) + .append(" maxLength: ") + .append(toIndentedString(maxLength)) + .append(newLine) + .append(" pattern: ") + .append(toIndentedString(pattern)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesTikTokBmMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesTikTokBmMoActionDocs.java new file mode 100644 index 0000000..c8cedb3 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesTikTokBmMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesTikTokBmMoHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesTikTokBmMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesTikTokBmMoActionDocs} instance. + */ + public ResourcesTikTokBmMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesTikTokBmMoActionDocs resourcesTikTokBmMoActionDocs = (ResourcesTikTokBmMoActionDocs) o; + return Objects.equals(this.type, resourcesTikTokBmMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesTikTokBmMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesTikTokBmMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesTikTokBmMoConfigurationRequest.java new file mode 100644 index 0000000..073f1e0 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesTikTokBmMoConfigurationRequest.java @@ -0,0 +1,269 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesTikTokBmMoConfigurationRequest model. + */ +public class ResourcesTikTokBmMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private ResourcesPlatformDocs platform; + + private String resource; + + private ResourcesTikTokBmMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + /** + * Constructs a new {@link ResourcesTikTokBmMoConfigurationRequest} instance. + */ + public ResourcesTikTokBmMoConfigurationRequest() { + super("TIKTOK_BM"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesTikTokBmMoConfigurationRequest instance}. + */ + public ResourcesTikTokBmMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesTikTokBmMoConfigurationRequest instance}. + */ + public ResourcesTikTokBmMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesTikTokBmMoConfigurationRequest instance}. + */ + public ResourcesTikTokBmMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesTikTokBmMoConfigurationRequest instance}. + */ + public ResourcesTikTokBmMoConfigurationRequest forwarding(ResourcesTikTokBmMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesTikTokBmMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesTikTokBmMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesTikTokBmMoConfigurationRequest instance}. + */ + public ResourcesTikTokBmMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesTikTokBmMoConfigurationRequest resourcesTikTokBmMoConfigurationRequest = + (ResourcesTikTokBmMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesTikTokBmMoConfigurationRequest.resourceKey) + && Objects.equals(this.platform, resourcesTikTokBmMoConfigurationRequest.platform) + && Objects.equals(this.resource, resourcesTikTokBmMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesTikTokBmMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesTikTokBmMoConfigurationRequest.conversations) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, platform, resource, forwarding, conversations, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesTikTokBmMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesTikTokBmMoHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesTikTokBmMoHttpForwardDocs.java new file mode 100644 index 0000000..b8953d9 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesTikTokBmMoHttpForwardDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesTikTokBmMoHttpForwardDocs model. + */ +public class ResourcesTikTokBmMoHttpForwardDocs extends ResourcesTikTokBmMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesTikTokBmMoHttpForwardDocs} instance. + */ + public ResourcesTikTokBmMoHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesTikTokBmMoHttpForwardDocs instance}. + */ + public ResourcesTikTokBmMoHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesTikTokBmMoHttpForwardDocs instance}. + */ + public ResourcesTikTokBmMoHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesTikTokBmMoHttpForwardDocs resourcesTikTokBmMoHttpForwardDocs = (ResourcesTikTokBmMoHttpForwardDocs) o; + return Objects.equals(this.url, resourcesTikTokBmMoHttpForwardDocs.url) + && Objects.equals(this.format, resourcesTikTokBmMoHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesTikTokBmMoHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesTrafficOrigin.java b/src/main/java/com/infobip/model/ResourcesTrafficOrigin.java new file mode 100644 index 0000000..315a7a8 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesTrafficOrigin.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The location from which outbound messages are sent, relative to the country associated with the sender. - LOCAL: Indicates that the business sending the messages is headquartered in the same country as the sender being launched. - INTERNATIONAL: Indicates that the business is headquartered outside the country associated with the sender being launched. + */ +public enum ResourcesTrafficOrigin { + LOCAL("LOCAL"), + INTERNATIONAL("INTERNATIONAL"); + + private final String value; + + ResourcesTrafficOrigin(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesTrafficOrigin fromValue(String value) { + for (ResourcesTrafficOrigin enumElement : ResourcesTrafficOrigin.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesTrafficType.java b/src/main/java/com/infobip/model/ResourcesTrafficType.java new file mode 100644 index 0000000..bbe34a7 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesTrafficType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of SMS messages you will send. - TRANSACTIONAL: Messages triggered by user actions or system events, such as one-time passwords (OTP/PIN), transaction alerts, password resets, or service notifications. - PROMOTIONAL: Messages sent for marketing or advertising purposes, such as promotions, offers, campaigns, or announcements. + */ +public enum ResourcesTrafficType { + PROMOTIONAL("PROMOTIONAL"), + TRANSACTIONAL("TRANSACTIONAL"); + + private final String value; + + ResourcesTrafficType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesTrafficType fromValue(String value) { + for (ResourcesTrafficType enumElement : ResourcesTrafficType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesUnsetOption.java b/src/main/java/com/infobip/model/ResourcesUnsetOption.java new file mode 100644 index 0000000..3af77c5 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesUnsetOption.java @@ -0,0 +1,52 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Used for unsetting configuration options. <br /> <b>If a property appears both in unset, and in the body of the request, it will <u>FIRST</u> be removed, and then <u>UPDATED</u> with the value from the request body!</b> + */ +public enum ResourcesUnsetOption { + USERNAME("USERNAME"), + PLATFORM("PLATFORM"), + FORWARDING("FORWARDING"), + CONVERSATIONS("CONVERSATIONS"), + ANSWERS("ANSWERS"), + AUTORESPONSE("AUTORESPONSE"), + BLOCKLISTCONFIGURATION("BLOCKLISTCONFIGURATION"); + + private final String value; + + ResourcesUnsetOption(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesUnsetOption fromValue(String value) { + for (ResourcesUnsetOption enumElement : ResourcesUnsetOption.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesUpdateResourceOrderRequest.java b/src/main/java/com/infobip/model/ResourcesUpdateResourceOrderRequest.java new file mode 100644 index 0000000..7ca9c4b --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesUpdateResourceOrderRequest.java @@ -0,0 +1,128 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesUpdateResourceOrderRequest model. + */ +public class ResourcesUpdateResourceOrderRequest { + + private List requirements = new ArrayList<>(); + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirements + * @return This {@link ResourcesUpdateResourceOrderRequest instance}. + */ + public ResourcesUpdateResourceOrderRequest requirements(List requirements) { + this.requirements = requirements; + return this; + } + + /** + * Adds and item into requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirementsItem The item to be added to the list. + * @return This {@link ResourcesUpdateResourceOrderRequest instance}. + */ + public ResourcesUpdateResourceOrderRequest addRequirementsItem(ResourcesFilledRequirement requirementsItem) { + if (this.requirements == null) { + this.requirements = new ArrayList<>(); + } + this.requirements.add(requirementsItem); + return this; + } + + /** + * Returns requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @return requirements + */ + @JsonProperty("requirements") + public List getRequirements() { + return requirements; + } + + /** + * Sets requirements. + *

+ * Field description: + * List of requirements for the resource. + *

+ * The field is required. + * + * @param requirements + */ + @JsonProperty("requirements") + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesUpdateResourceOrderRequest resourcesUpdateResourceOrderRequest = + (ResourcesUpdateResourceOrderRequest) o; + return Objects.equals(this.requirements, resourcesUpdateResourceOrderRequest.requirements); + } + + @Override + public int hashCode() { + return Objects.hash(requirements); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesUpdateResourceOrderRequest {") + .append(newLine) + .append(" requirements: ") + .append(toIndentedString(requirements)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesUrlRequirementSpec.java b/src/main/java/com/infobip/model/ResourcesUrlRequirementSpec.java new file mode 100644 index 0000000..1141c0f --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesUrlRequirementSpec.java @@ -0,0 +1,332 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesUrlRequirementSpec model. + */ +public class ResourcesUrlRequirementSpec extends ResourcesRequirementSpec { + + private String key; + + private String name; + + private String description; + + private Boolean required; + + private Boolean multipleValuesSupported; + + private ResourcesCategory category; + + /** + * Constructs a new {@link ResourcesUrlRequirementSpec} instance. + */ + public ResourcesUrlRequirementSpec() { + super("URL"); + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + * @return This {@link ResourcesUrlRequirementSpec instance}. + */ + public ResourcesUrlRequirementSpec key(String key) { + this.key = key; + return this; + } + + /** + * Returns key. + *

+ * Field description: + * Key of the requirement. + * + * @return key + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + /** + * Sets key. + *

+ * Field description: + * Key of the requirement. + * + * @param key + */ + @JsonProperty("key") + public void setKey(String key) { + this.key = key; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + * @return This {@link ResourcesUrlRequirementSpec instance}. + */ + public ResourcesUrlRequirementSpec name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * Name of the requirement. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * Name of the requirement. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + * @return This {@link ResourcesUrlRequirementSpec instance}. + */ + public ResourcesUrlRequirementSpec description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Description of the requirement. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Description of the requirement. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + * @return This {@link ResourcesUrlRequirementSpec instance}. + */ + public ResourcesUrlRequirementSpec required(Boolean required) { + this.required = required; + return this; + } + + /** + * Returns required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @return required + */ + @JsonProperty("required") + public Boolean getRequired() { + return required; + } + + /** + * Sets required. + *

+ * Field description: + * Flag that indicates if the requirement is required. + * + * @param required + */ + @JsonProperty("required") + public void setRequired(Boolean required) { + this.required = required; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + * @return This {@link ResourcesUrlRequirementSpec instance}. + */ + public ResourcesUrlRequirementSpec multipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + return this; + } + + /** + * Returns multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @return multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public Boolean getMultipleValuesSupported() { + return multipleValuesSupported; + } + + /** + * Sets multipleValuesSupported. + *

+ * Field description: + * Flag that indicates if multiple values can be provided. + * + * @param multipleValuesSupported + */ + @JsonProperty("multipleValuesSupported") + public void setMultipleValuesSupported(Boolean multipleValuesSupported) { + this.multipleValuesSupported = multipleValuesSupported; + } + + /** + * Sets category. + * + * @param category + * @return This {@link ResourcesUrlRequirementSpec instance}. + */ + public ResourcesUrlRequirementSpec category(ResourcesCategory category) { + this.category = category; + return this; + } + + /** + * Returns category. + * + * @return category + */ + @JsonProperty("category") + public ResourcesCategory getCategory() { + return category; + } + + /** + * Sets category. + * + * @param category + */ + @JsonProperty("category") + public void setCategory(ResourcesCategory category) { + this.category = category; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesUrlRequirementSpec resourcesUrlRequirementSpec = (ResourcesUrlRequirementSpec) o; + return Objects.equals(this.key, resourcesUrlRequirementSpec.key) + && Objects.equals(this.name, resourcesUrlRequirementSpec.name) + && Objects.equals(this.description, resourcesUrlRequirementSpec.description) + && Objects.equals(this.required, resourcesUrlRequirementSpec.required) + && Objects.equals(this.multipleValuesSupported, resourcesUrlRequirementSpec.multipleValuesSupported) + && Objects.equals(this.category, resourcesUrlRequirementSpec.category) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(key, name, description, required, multipleValuesSupported, category, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesUrlRequirementSpec {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" key: ") + .append(toIndentedString(key)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" required: ") + .append(toIndentedString(required)) + .append(newLine) + .append(" multipleValuesSupported: ") + .append(toIndentedString(multipleValuesSupported)) + .append(newLine) + .append(" category: ") + .append(toIndentedString(category)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesUseAnswers.java b/src/main/java/com/infobip/model/ResourcesUseAnswers.java new file mode 100644 index 0000000..7be902a --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesUseAnswers.java @@ -0,0 +1,106 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Used for forwarding messages to Answers service. + */ +public class ResourcesUseAnswers { + + private Boolean enabled; + + /** + * Sets enabled. + *

+ * Field description: + * Flag which indicates if this action should be enabled. If set to false, the effect will be the same as adding the answers to unset which will remove the object. + *

+ * The field is required. + * + * @param enabled + * @return This {@link ResourcesUseAnswers instance}. + */ + public ResourcesUseAnswers enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Returns enabled. + *

+ * Field description: + * Flag which indicates if this action should be enabled. If set to false, the effect will be the same as adding the answers to unset which will remove the object. + *

+ * The field is required. + * + * @return enabled + */ + @JsonProperty("enabled") + public Boolean getEnabled() { + return enabled; + } + + /** + * Sets enabled. + *

+ * Field description: + * Flag which indicates if this action should be enabled. If set to false, the effect will be the same as adding the answers to unset which will remove the object. + *

+ * The field is required. + * + * @param enabled + */ + @JsonProperty("enabled") + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesUseAnswers resourcesUseAnswers = (ResourcesUseAnswers) o; + return Objects.equals(this.enabled, resourcesUseAnswers.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesUseAnswers {") + .append(newLine) + .append(" enabled: ") + .append(toIndentedString(enabled)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesUseConversations.java b/src/main/java/com/infobip/model/ResourcesUseConversations.java new file mode 100644 index 0000000..6ccf178 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesUseConversations.java @@ -0,0 +1,106 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Used for forwarding messages to Conversations service. + */ +public class ResourcesUseConversations { + + private Boolean enabled; + + /** + * Sets enabled. + *

+ * Field description: + * Flag which indicates if this action should be enabled. If set to false, the effect will be the same as adding the conversations to unset which will remove the object. + *

+ * The field is required. + * + * @param enabled + * @return This {@link ResourcesUseConversations instance}. + */ + public ResourcesUseConversations enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Returns enabled. + *

+ * Field description: + * Flag which indicates if this action should be enabled. If set to false, the effect will be the same as adding the conversations to unset which will remove the object. + *

+ * The field is required. + * + * @return enabled + */ + @JsonProperty("enabled") + public Boolean getEnabled() { + return enabled; + } + + /** + * Sets enabled. + *

+ * Field description: + * Flag which indicates if this action should be enabled. If set to false, the effect will be the same as adding the conversations to unset which will remove the object. + *

+ * The field is required. + * + * @param enabled + */ + @JsonProperty("enabled") + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesUseConversations resourcesUseConversations = (ResourcesUseConversations) o; + return Objects.equals(this.enabled, resourcesUseConversations.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesUseConversations {") + .append(newLine) + .append(" enabled: ") + .append(toIndentedString(enabled)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberBmHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesViberBmHttpForwardDocs.java new file mode 100644 index 0000000..646bbc9 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberBmHttpForwardDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesViberBmHttpForwardDocs model. + */ +public class ResourcesViberBmHttpForwardDocs extends ResourcesViberBmMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesViberBmHttpForwardDocs} instance. + */ + public ResourcesViberBmHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesViberBmHttpForwardDocs instance}. + */ + public ResourcesViberBmHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesViberBmHttpForwardDocs instance}. + */ + public ResourcesViberBmHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberBmHttpForwardDocs resourcesViberBmHttpForwardDocs = (ResourcesViberBmHttpForwardDocs) o; + return Objects.equals(this.url, resourcesViberBmHttpForwardDocs.url) + && Objects.equals(this.format, resourcesViberBmHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberBmHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberBmMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesViberBmMoActionDocs.java new file mode 100644 index 0000000..ad642de --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberBmMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesViberBmHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesViberBmMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesViberBmMoActionDocs} instance. + */ + public ResourcesViberBmMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberBmMoActionDocs resourcesViberBmMoActionDocs = (ResourcesViberBmMoActionDocs) o; + return Objects.equals(this.type, resourcesViberBmMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberBmMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberBmMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesViberBmMoConfigurationRequest.java new file mode 100644 index 0000000..7de5ab2 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberBmMoConfigurationRequest.java @@ -0,0 +1,306 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesViberBmMoConfigurationRequest model. + */ +public class ResourcesViberBmMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private ResourcesPlatformDocs platform; + + private String resource; + + private ResourcesViberBmMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + private ResourcesAutoResponseActionRequest autoResponse; + + /** + * Constructs a new {@link ResourcesViberBmMoConfigurationRequest} instance. + */ + public ResourcesViberBmMoConfigurationRequest() { + super("VIBER_BM"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesViberBmMoConfigurationRequest instance}. + */ + public ResourcesViberBmMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesViberBmMoConfigurationRequest instance}. + */ + public ResourcesViberBmMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesViberBmMoConfigurationRequest instance}. + */ + public ResourcesViberBmMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesViberBmMoConfigurationRequest instance}. + */ + public ResourcesViberBmMoConfigurationRequest forwarding(ResourcesViberBmMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesViberBmMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesViberBmMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesViberBmMoConfigurationRequest instance}. + */ + public ResourcesViberBmMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + * @return This {@link ResourcesViberBmMoConfigurationRequest instance}. + */ + public ResourcesViberBmMoConfigurationRequest autoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + return this; + } + + /** + * Returns autoResponse. + * + * @return autoResponse + */ + @JsonProperty("autoResponse") + public ResourcesAutoResponseActionRequest getAutoResponse() { + return autoResponse; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + */ + @JsonProperty("autoResponse") + public void setAutoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberBmMoConfigurationRequest resourcesViberBmMoConfigurationRequest = + (ResourcesViberBmMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesViberBmMoConfigurationRequest.resourceKey) + && Objects.equals(this.platform, resourcesViberBmMoConfigurationRequest.platform) + && Objects.equals(this.resource, resourcesViberBmMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesViberBmMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesViberBmMoConfigurationRequest.conversations) + && Objects.equals(this.autoResponse, resourcesViberBmMoConfigurationRequest.autoResponse) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, platform, resource, forwarding, conversations, autoResponse, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberBmMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append(" autoResponse: ") + .append(toIndentedString(autoResponse)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberBotHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesViberBotHttpForwardDocs.java new file mode 100644 index 0000000..ed65a77 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberBotHttpForwardDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesViberBotHttpForwardDocs model. + */ +public class ResourcesViberBotHttpForwardDocs extends ResourcesViberBotMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesViberBotHttpForwardDocs} instance. + */ + public ResourcesViberBotHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesViberBotHttpForwardDocs instance}. + */ + public ResourcesViberBotHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesViberBotHttpForwardDocs instance}. + */ + public ResourcesViberBotHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberBotHttpForwardDocs resourcesViberBotHttpForwardDocs = (ResourcesViberBotHttpForwardDocs) o; + return Objects.equals(this.url, resourcesViberBotHttpForwardDocs.url) + && Objects.equals(this.format, resourcesViberBotHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberBotHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberBotMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesViberBotMoActionDocs.java new file mode 100644 index 0000000..d8eaeb5 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberBotMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesViberBotHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesViberBotMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesViberBotMoActionDocs} instance. + */ + public ResourcesViberBotMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberBotMoActionDocs resourcesViberBotMoActionDocs = (ResourcesViberBotMoActionDocs) o; + return Objects.equals(this.type, resourcesViberBotMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberBotMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberBotMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesViberBotMoConfigurationRequest.java new file mode 100644 index 0000000..651dbc4 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberBotMoConfigurationRequest.java @@ -0,0 +1,269 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesViberBotMoConfigurationRequest model. + */ +public class ResourcesViberBotMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private ResourcesPlatformDocs platform; + + private String resource; + + private ResourcesViberBotMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + /** + * Constructs a new {@link ResourcesViberBotMoConfigurationRequest} instance. + */ + public ResourcesViberBotMoConfigurationRequest() { + super("VIBER_BOT"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesViberBotMoConfigurationRequest instance}. + */ + public ResourcesViberBotMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesViberBotMoConfigurationRequest instance}. + */ + public ResourcesViberBotMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesViberBotMoConfigurationRequest instance}. + */ + public ResourcesViberBotMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesViberBotMoConfigurationRequest instance}. + */ + public ResourcesViberBotMoConfigurationRequest forwarding(ResourcesViberBotMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesViberBotMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesViberBotMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesViberBotMoConfigurationRequest instance}. + */ + public ResourcesViberBotMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberBotMoConfigurationRequest resourcesViberBotMoConfigurationRequest = + (ResourcesViberBotMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesViberBotMoConfigurationRequest.resourceKey) + && Objects.equals(this.platform, resourcesViberBotMoConfigurationRequest.platform) + && Objects.equals(this.resource, resourcesViberBotMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesViberBotMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesViberBotMoConfigurationRequest.conversations) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, platform, resource, forwarding, conversations, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberBotMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberCoverageInfo.java b/src/main/java/com/infobip/model/ResourcesViberCoverageInfo.java new file mode 100644 index 0000000..2933fa6 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberCoverageInfo.java @@ -0,0 +1,375 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about the sender coverage. + */ +public class ResourcesViberCoverageInfo implements ResourcesIbResourceCoverageInfo { + + private String resource; + + private Boolean shared; + + private String originalResourceName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesViberCoverageInfo instance}. + */ + public ResourcesViberCoverageInfo resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @param shared + * @return This {@link ResourcesViberCoverageInfo instance}. + */ + public ResourcesViberCoverageInfo shared(Boolean shared) { + this.shared = shared; + return this; + } + + /** + * Returns shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @return shared + */ + @JsonProperty("shared") + public Boolean getShared() { + return shared; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @param shared + */ + @JsonProperty("shared") + public void setShared(Boolean shared) { + this.shared = shared; + } + + /** + * Sets originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @param originalResourceName + * @return This {@link ResourcesViberCoverageInfo instance}. + */ + public ResourcesViberCoverageInfo originalResourceName(String originalResourceName) { + this.originalResourceName = originalResourceName; + return this; + } + + /** + * Returns originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @return originalResourceName + */ + @JsonProperty("originalResourceName") + public String getOriginalResourceName() { + return originalResourceName; + } + + /** + * Sets originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @param originalResourceName + */ + @JsonProperty("originalResourceName") + public void setOriginalResourceName(String originalResourceName) { + this.originalResourceName = originalResourceName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesViberCoverageInfo instance}. + */ + public ResourcesViberCoverageInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesViberCoverageInfo instance}. + */ + public ResourcesViberCoverageInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + * + * @param capabilities + * @return This {@link ResourcesViberCoverageInfo instance}. + */ + public ResourcesViberCoverageInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesViberCoverageInfo instance}. + */ + public ResourcesViberCoverageInfo addCapabilitiesItem(ResourcesIbResourceCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesViberCoverageInfo instance}. + */ + public ResourcesViberCoverageInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberCoverageInfo resourcesViberCoverageInfo = (ResourcesViberCoverageInfo) o; + return Objects.equals(this.resource, resourcesViberCoverageInfo.resource) + && Objects.equals(this.shared, resourcesViberCoverageInfo.shared) + && Objects.equals(this.originalResourceName, resourcesViberCoverageInfo.originalResourceName) + && Objects.equals(this.countryCode, resourcesViberCoverageInfo.countryCode) + && Objects.equals(this.countryName, resourcesViberCoverageInfo.countryName) + && Objects.equals(this.capabilities, resourcesViberCoverageInfo.capabilities) + && Objects.equals(this.resourceType, resourcesViberCoverageInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash( + resource, shared, originalResourceName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberCoverageInfo {") + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" shared: ") + .append(toIndentedString(shared)) + .append(newLine) + .append(" originalResourceName: ") + .append(toIndentedString(originalResourceName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberCoverageKey.java b/src/main/java/com/infobip/model/ResourcesViberCoverageKey.java new file mode 100644 index 0000000..19bc0d3 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberCoverageKey.java @@ -0,0 +1,261 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesViberCoverageKey model. + */ +public class ResourcesViberCoverageKey extends ResourcesIbResourceCoverageKey { + + private String resource; + + private Boolean shared; + + private String originalResourceName; + + private String countryCode; + + /** + * Constructs a new {@link ResourcesViberCoverageKey} instance. + */ + public ResourcesViberCoverageKey() { + super("VIBER_RESOURCE"); + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @param resource + * @return This {@link ResourcesViberCoverageKey instance}. + */ + public ResourcesViberCoverageKey resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + *

+ * The field is required. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @param shared + * @return This {@link ResourcesViberCoverageKey instance}. + */ + public ResourcesViberCoverageKey shared(Boolean shared) { + this.shared = shared; + return this; + } + + /** + * Returns shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @return shared + */ + @JsonProperty("shared") + public Boolean getShared() { + return shared; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @param shared + */ + @JsonProperty("shared") + public void setShared(Boolean shared) { + this.shared = shared; + } + + /** + * Sets originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @param originalResourceName + * @return This {@link ResourcesViberCoverageKey instance}. + */ + public ResourcesViberCoverageKey originalResourceName(String originalResourceName) { + this.originalResourceName = originalResourceName; + return this; + } + + /** + * Returns originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @return originalResourceName + */ + @JsonProperty("originalResourceName") + public String getOriginalResourceName() { + return originalResourceName; + } + + /** + * Sets originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @param originalResourceName + */ + @JsonProperty("originalResourceName") + public void setOriginalResourceName(String originalResourceName) { + this.originalResourceName = originalResourceName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + * @return This {@link ResourcesViberCoverageKey instance}. + */ + public ResourcesViberCoverageKey countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + *

+ * The field is required. + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberCoverageKey resourcesViberCoverageKey = (ResourcesViberCoverageKey) o; + return Objects.equals(this.resource, resourcesViberCoverageKey.resource) + && Objects.equals(this.shared, resourcesViberCoverageKey.shared) + && Objects.equals(this.originalResourceName, resourcesViberCoverageKey.originalResourceName) + && Objects.equals(this.countryCode, resourcesViberCoverageKey.countryCode) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resource, shared, originalResourceName, countryCode, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberCoverageKey {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" shared: ") + .append(toIndentedString(shared)) + .append(newLine) + .append(" originalResourceName: ") + .append(toIndentedString(originalResourceName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberResourceFilter.java b/src/main/java/com/infobip/model/ResourcesViberResourceFilter.java new file mode 100644 index 0000000..62ea453 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberResourceFilter.java @@ -0,0 +1,110 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Viber filter for resources. + */ +public class ResourcesViberResourceFilter extends ResourcesIbResourcesFilter { + + private String resource; + + /** + * Constructs a new {@link ResourcesViberResourceFilter} instance. + */ + public ResourcesViberResourceFilter() { + super("VIBER_RESOURCE"); + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesViberResourceFilter instance}. + */ + public ResourcesViberResourceFilter resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberResourceFilter resourcesViberResourceFilter = (ResourcesViberResourceFilter) o; + return Objects.equals(this.resource, resourcesViberResourceFilter.resource) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resource, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberResourceFilter {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesViberResourceInfo.java b/src/main/java/com/infobip/model/ResourcesViberResourceInfo.java new file mode 100644 index 0000000..311cc2f --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesViberResourceInfo.java @@ -0,0 +1,387 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashSet; +import java.util.Objects; +import java.util.Set; + +/** + * Information about Viber type of resource. + */ +public class ResourcesViberResourceInfo implements ResourcesIbResourceInfo { + + private String resource; + + private Boolean shared; + + private String originalResourceName; + + private String countryCode; + + private String countryName; + + private Set capabilities = null; + + private ResourcesIbResourceType resourceType; + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + * @return This {@link ResourcesViberResourceInfo instance}. + */ + public ResourcesViberResourceInfo resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Resource name. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Resource name. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @param shared + * @return This {@link ResourcesViberResourceInfo instance}. + */ + public ResourcesViberResourceInfo shared(Boolean shared) { + this.shared = shared; + return this; + } + + /** + * Returns shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @return shared + */ + @JsonProperty("shared") + public Boolean getShared() { + return shared; + } + + /** + * Sets shared. + *

+ * Field description: + * Indicates whether a resource is shared. + * + * @param shared + */ + @JsonProperty("shared") + public void setShared(Boolean shared) { + this.shared = shared; + } + + /** + * Sets originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @param originalResourceName + * @return This {@link ResourcesViberResourceInfo instance}. + */ + public ResourcesViberResourceInfo originalResourceName(String originalResourceName) { + this.originalResourceName = originalResourceName; + return this; + } + + /** + * Returns originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @return originalResourceName + */ + @JsonProperty("originalResourceName") + public String getOriginalResourceName() { + return originalResourceName; + } + + /** + * Sets originalResourceName. + *

+ * Field description: + * Original resource name. + * + * @param originalResourceName + */ + @JsonProperty("originalResourceName") + public void setOriginalResourceName(String originalResourceName) { + this.originalResourceName = originalResourceName; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + * @return This {@link ResourcesViberResourceInfo instance}. + */ + public ResourcesViberResourceInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Returns countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @return countryCode + */ + @JsonProperty("countryCode") + public String getCountryCode() { + return countryCode; + } + + /** + * Sets countryCode. + *

+ * Field description: + * Country code in two-letter ISO standard. Required for identifying country specific resources (for instance, short code number types). + * + * @param countryCode + */ + @JsonProperty("countryCode") + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + * @return This {@link ResourcesViberResourceInfo instance}. + */ + public ResourcesViberResourceInfo countryName(String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Returns countryName. + *

+ * Field description: + * Country name. + * + * @return countryName + */ + @JsonProperty("countryName") + public String getCountryName() { + return countryName; + } + + /** + * Sets countryName. + *

+ * Field description: + * Country name. + * + * @param countryName + */ + @JsonProperty("countryName") + public void setCountryName(String countryName) { + this.countryName = countryName; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + * @return This {@link ResourcesViberResourceInfo instance}. + */ + public ResourcesViberResourceInfo capabilities(Set capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Adds and item into capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilitiesItem The item to be added to the list. + * @return This {@link ResourcesViberResourceInfo instance}. + */ + public ResourcesViberResourceInfo addCapabilitiesItem(ResourcesResourceCapabilityChannel capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new LinkedHashSet<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Returns capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @return capabilities + */ + @JsonProperty("capabilities") + public Set getCapabilities() { + return capabilities; + } + + /** + * Sets capabilities. + *

+ * Field description: + * Capabilities of the sender. + * + * @param capabilities + */ + @JsonProperty("capabilities") + public void setCapabilities(Set capabilities) { + this.capabilities = capabilities; + } + + /** + * Sets resourceType. + * + * @param resourceType + * @return This {@link ResourcesViberResourceInfo instance}. + */ + public ResourcesViberResourceInfo resourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Returns resourceType. + * + * @return resourceType + */ + @JsonProperty("resourceType") + public ResourcesIbResourceType getResourceType() { + return resourceType; + } + + /** + * Sets resourceType. + * + * @param resourceType + */ + @JsonProperty("resourceType") + public void setResourceType(ResourcesIbResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesViberResourceInfo resourcesViberResourceInfo = (ResourcesViberResourceInfo) o; + return Objects.equals(this.resource, resourcesViberResourceInfo.resource) + && Objects.equals(this.shared, resourcesViberResourceInfo.shared) + && Objects.equals(this.originalResourceName, resourcesViberResourceInfo.originalResourceName) + && Objects.equals(this.countryCode, resourcesViberResourceInfo.countryCode) + && Objects.equals(this.countryName, resourcesViberResourceInfo.countryName) + && Objects.equals(this.capabilities, resourcesViberResourceInfo.capabilities) + && Objects.equals(this.resourceType, resourcesViberResourceInfo.resourceType); + } + + @Override + public int hashCode() { + return Objects.hash( + resource, shared, originalResourceName, countryCode, countryName, capabilities, resourceType); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesViberResourceInfo {") + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" shared: ") + .append(toIndentedString(shared)) + .append(newLine) + .append(" originalResourceName: ") + .append(toIndentedString(originalResourceName)) + .append(newLine) + .append(" countryCode: ") + .append(toIndentedString(countryCode)) + .append(newLine) + .append(" countryName: ") + .append(toIndentedString(countryName)) + .append(newLine) + .append(" capabilities: ") + .append(toIndentedString(capabilities)) + .append(newLine) + .append(" resourceType: ") + .append(toIndentedString(resourceType)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocRequestBody.java b/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocRequestBody.java new file mode 100644 index 0000000..4ec7934 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocRequestBody.java @@ -0,0 +1,120 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents ResourcesWebhookNotifApiDocRequestBody model. + */ +public class ResourcesWebhookNotifApiDocRequestBody { + + private List results = null; + + /** + * Sets results. + *

+ * Field description: + * List of events provided in a single request. + * + * @param results + * @return This {@link ResourcesWebhookNotifApiDocRequestBody instance}. + */ + public ResourcesWebhookNotifApiDocRequestBody results(List results) { + this.results = results; + return this; + } + + /** + * Adds and item into results. + *

+ * Field description: + * List of events provided in a single request. + * + * @param resultsItem The item to be added to the list. + * @return This {@link ResourcesWebhookNotifApiDocRequestBody instance}. + */ + public ResourcesWebhookNotifApiDocRequestBody addResultsItem(ResourcesWebhookNotifApiDocResult resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Returns results. + *

+ * Field description: + * List of events provided in a single request. + * + * @return results + */ + @JsonProperty("results") + public List getResults() { + return results; + } + + /** + * Sets results. + *

+ * Field description: + * List of events provided in a single request. + * + * @param results + */ + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesWebhookNotifApiDocRequestBody resourcesWebhookNotifApiDocRequestBody = + (ResourcesWebhookNotifApiDocRequestBody) o; + return Objects.equals(this.results, resourcesWebhookNotifApiDocRequestBody.results); + } + + @Override + public int hashCode() { + return Objects.hash(results); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesWebhookNotifApiDocRequestBody {") + .append(newLine) + .append(" results: ") + .append(toIndentedString(results)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocResult.java b/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocResult.java new file mode 100644 index 0000000..b41791b --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocResult.java @@ -0,0 +1,230 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * List of events provided in a single request. + */ +public class ResourcesWebhookNotifApiDocResult { + + private ResourcesWebhookNotifEventType event; + + private OffsetDateTime receivedAt; + + private ResourcesWebhookNotifApiDocResultContent content; + + private Platform platform; + + /** + * Sets event. + *

+ * The field is required. + * + * @param event + * @return This {@link ResourcesWebhookNotifApiDocResult instance}. + */ + public ResourcesWebhookNotifApiDocResult event(ResourcesWebhookNotifEventType event) { + this.event = event; + return this; + } + + /** + * Returns event. + *

+ * The field is required. + * + * @return event + */ + @JsonProperty("event") + public ResourcesWebhookNotifEventType getEvent() { + return event; + } + + /** + * Sets event. + *

+ * The field is required. + * + * @param event + */ + @JsonProperty("event") + public void setEvent(ResourcesWebhookNotifEventType event) { + this.event = event; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when the request status was updated. + *

+ * The field is required. + * + * @param receivedAt + * @return This {@link ResourcesWebhookNotifApiDocResult instance}. + */ + public ResourcesWebhookNotifApiDocResult receivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + return this; + } + + /** + * Returns receivedAt. + *

+ * Field description: + * Date and time when the request status was updated. + *

+ * The field is required. + * + * @return receivedAt + */ + @JsonProperty("receivedAt") + public OffsetDateTime getReceivedAt() { + return receivedAt; + } + + /** + * Sets receivedAt. + *

+ * Field description: + * Date and time when the request status was updated. + *

+ * The field is required. + * + * @param receivedAt + */ + @JsonProperty("receivedAt") + public void setReceivedAt(OffsetDateTime receivedAt) { + this.receivedAt = receivedAt; + } + + /** + * Sets content. + *

+ * The field is required. + * + * @param content + * @return This {@link ResourcesWebhookNotifApiDocResult instance}. + */ + public ResourcesWebhookNotifApiDocResult content(ResourcesWebhookNotifApiDocResultContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + *

+ * The field is required. + * + * @return content + */ + @JsonProperty("content") + public ResourcesWebhookNotifApiDocResultContent getContent() { + return content; + } + + /** + * Sets content. + *

+ * The field is required. + * + * @param content + */ + @JsonProperty("content") + public void setContent(ResourcesWebhookNotifApiDocResultContent content) { + this.content = content; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesWebhookNotifApiDocResult instance}. + */ + public ResourcesWebhookNotifApiDocResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesWebhookNotifApiDocResult resourcesWebhookNotifApiDocResult = (ResourcesWebhookNotifApiDocResult) o; + return Objects.equals(this.event, resourcesWebhookNotifApiDocResult.event) + && Objects.equals(this.receivedAt, resourcesWebhookNotifApiDocResult.receivedAt) + && Objects.equals(this.content, resourcesWebhookNotifApiDocResult.content) + && Objects.equals(this.platform, resourcesWebhookNotifApiDocResult.platform); + } + + @Override + public int hashCode() { + return Objects.hash(event, receivedAt, content, platform); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesWebhookNotifApiDocResult {") + .append(newLine) + .append(" event: ") + .append(toIndentedString(event)) + .append(newLine) + .append(" receivedAt: ") + .append(toIndentedString(receivedAt)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocResultContent.java b/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocResultContent.java new file mode 100644 index 0000000..3fc5ae4 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesWebhookNotifApiDocResultContent.java @@ -0,0 +1,27 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaWebhookNotifApiDoc.class, name = "ALPHANUMERIC_REGISTRATION"), + @JsonSubTypes.Type(value = ResourcesNumberWebhookNotifApiDoc.class, name = "NUMBER_PURCHASE"), + @JsonSubTypes.Type(value = ResourcesRcsWebhookNotifApiDoc.class, name = "RCS_SENDER_LAUNCH") +}) +public interface ResourcesWebhookNotifApiDocResultContent { + public ResourcesWebhookNotifContentType getType(); +} diff --git a/src/main/java/com/infobip/model/ResourcesWebhookNotifContentType.java b/src/main/java/com/infobip/model/ResourcesWebhookNotifContentType.java new file mode 100644 index 0000000..9e7b50a --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesWebhookNotifContentType.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of resource. + */ +public enum ResourcesWebhookNotifContentType { + ALPHANUMERIC_REGISTRATION("ALPHANUMERIC_REGISTRATION"), + NUMBER_PURCHASE("NUMBER_PURCHASE"), + RCS_SENDER_LAUNCH("RCS_SENDER_LAUNCH"); + + private final String value; + + ResourcesWebhookNotifContentType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesWebhookNotifContentType fromValue(String value) { + for (ResourcesWebhookNotifContentType enumElement : ResourcesWebhookNotifContentType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesWebhookNotifEventType.java b/src/main/java/com/infobip/model/ResourcesWebhookNotifEventType.java new file mode 100644 index 0000000..538eeb8 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesWebhookNotifEventType.java @@ -0,0 +1,46 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Name of event that is received. + */ +public enum ResourcesWebhookNotifEventType { + RESOURCE_REQUEST_STATUS_UPDATE("RESOURCE_REQUEST_STATUS_UPDATE"); + + private final String value; + + ResourcesWebhookNotifEventType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourcesWebhookNotifEventType fromValue(String value) { + for (ResourcesWebhookNotifEventType enumElement : ResourcesWebhookNotifEventType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesWhatsAppHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesWhatsAppHttpForwardDocs.java new file mode 100644 index 0000000..e57c2c0 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesWhatsAppHttpForwardDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesWhatsAppHttpForwardDocs model. + */ +public class ResourcesWhatsAppHttpForwardDocs extends ResourcesWhatsAppMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesWhatsAppHttpForwardDocs} instance. + */ + public ResourcesWhatsAppHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesWhatsAppHttpForwardDocs instance}. + */ + public ResourcesWhatsAppHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesWhatsAppHttpForwardDocs instance}. + */ + public ResourcesWhatsAppHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesWhatsAppHttpForwardDocs resourcesWhatsAppHttpForwardDocs = (ResourcesWhatsAppHttpForwardDocs) o; + return Objects.equals(this.url, resourcesWhatsAppHttpForwardDocs.url) + && Objects.equals(this.format, resourcesWhatsAppHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesWhatsAppHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesWhatsAppMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesWhatsAppMoActionDocs.java new file mode 100644 index 0000000..cd47e2f --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesWhatsAppMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesWhatsAppHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesWhatsAppMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesWhatsAppMoActionDocs} instance. + */ + public ResourcesWhatsAppMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesWhatsAppMoActionDocs resourcesWhatsAppMoActionDocs = (ResourcesWhatsAppMoActionDocs) o; + return Objects.equals(this.type, resourcesWhatsAppMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesWhatsAppMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesWhatsAppMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesWhatsAppMoConfigurationRequest.java new file mode 100644 index 0000000..43dc24a --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesWhatsAppMoConfigurationRequest.java @@ -0,0 +1,353 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesWhatsAppMoConfigurationRequest model. + */ +public class ResourcesWhatsAppMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String numberKey; + + private ResourcesPlatformDocs platform; + + private String number; + + private ResourcesWhatsAppMoActionDocs forwarding; + + private ResourcesUseConversations conversations; + + private ResourcesAutoResponseActionRequest autoResponse; + + private ResourcesBlockListConfigurationRequest blockListConfiguration; + + /** + * Constructs a new {@link ResourcesWhatsAppMoConfigurationRequest} instance. + */ + public ResourcesWhatsAppMoConfigurationRequest() { + super("WHATSAPP"); + } + + /** + * Sets numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @param numberKey + * @return This {@link ResourcesWhatsAppMoConfigurationRequest instance}. + */ + public ResourcesWhatsAppMoConfigurationRequest numberKey(String numberKey) { + this.numberKey = numberKey; + return this; + } + + /** + * Returns numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @return numberKey + */ + @JsonProperty("numberKey") + public String getNumberKey() { + return numberKey; + } + + /** + * Sets numberKey. + *

+ * Field description: + * Required if <code>number</code> not present. + * + * @param numberKey + */ + @JsonProperty("numberKey") + public void setNumberKey(String numberKey) { + this.numberKey = numberKey; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesWhatsAppMoConfigurationRequest instance}. + */ + public ResourcesWhatsAppMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + /** + * Sets number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @param number + * @return This {@link ResourcesWhatsAppMoConfigurationRequest instance}. + */ + public ResourcesWhatsAppMoConfigurationRequest number(String number) { + this.number = number; + return this; + } + + /** + * Returns number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @return number + */ + @JsonProperty("number") + public String getNumber() { + return number; + } + + /** + * Sets number. + *

+ * Field description: + * Required if <code>numberKey</code> not present. + * + * @param number + */ + @JsonProperty("number") + public void setNumber(String number) { + this.number = number; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesWhatsAppMoConfigurationRequest instance}. + */ + public ResourcesWhatsAppMoConfigurationRequest forwarding(ResourcesWhatsAppMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesWhatsAppMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesWhatsAppMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets conversations. + * + * @param conversations + * @return This {@link ResourcesWhatsAppMoConfigurationRequest instance}. + */ + public ResourcesWhatsAppMoConfigurationRequest conversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + return this; + } + + /** + * Returns conversations. + * + * @return conversations + */ + @JsonProperty("conversations") + public ResourcesUseConversations getConversations() { + return conversations; + } + + /** + * Sets conversations. + * + * @param conversations + */ + @JsonProperty("conversations") + public void setConversations(ResourcesUseConversations conversations) { + this.conversations = conversations; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + * @return This {@link ResourcesWhatsAppMoConfigurationRequest instance}. + */ + public ResourcesWhatsAppMoConfigurationRequest autoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + return this; + } + + /** + * Returns autoResponse. + * + * @return autoResponse + */ + @JsonProperty("autoResponse") + public ResourcesAutoResponseActionRequest getAutoResponse() { + return autoResponse; + } + + /** + * Sets autoResponse. + * + * @param autoResponse + */ + @JsonProperty("autoResponse") + public void setAutoResponse(ResourcesAutoResponseActionRequest autoResponse) { + this.autoResponse = autoResponse; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + * @return This {@link ResourcesWhatsAppMoConfigurationRequest instance}. + */ + public ResourcesWhatsAppMoConfigurationRequest blockListConfiguration( + ResourcesBlockListConfigurationRequest blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + return this; + } + + /** + * Returns blockListConfiguration. + * + * @return blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public ResourcesBlockListConfigurationRequest getBlockListConfiguration() { + return blockListConfiguration; + } + + /** + * Sets blockListConfiguration. + * + * @param blockListConfiguration + */ + @JsonProperty("blockListConfiguration") + public void setBlockListConfiguration(ResourcesBlockListConfigurationRequest blockListConfiguration) { + this.blockListConfiguration = blockListConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesWhatsAppMoConfigurationRequest resourcesWhatsAppMoConfigurationRequest = + (ResourcesWhatsAppMoConfigurationRequest) o; + return Objects.equals(this.numberKey, resourcesWhatsAppMoConfigurationRequest.numberKey) + && Objects.equals(this.platform, resourcesWhatsAppMoConfigurationRequest.platform) + && Objects.equals(this.number, resourcesWhatsAppMoConfigurationRequest.number) + && Objects.equals(this.forwarding, resourcesWhatsAppMoConfigurationRequest.forwarding) + && Objects.equals(this.conversations, resourcesWhatsAppMoConfigurationRequest.conversations) + && Objects.equals(this.autoResponse, resourcesWhatsAppMoConfigurationRequest.autoResponse) + && Objects.equals( + this.blockListConfiguration, resourcesWhatsAppMoConfigurationRequest.blockListConfiguration) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + numberKey, + platform, + number, + forwarding, + conversations, + autoResponse, + blockListConfiguration, + super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesWhatsAppMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" numberKey: ") + .append(toIndentedString(numberKey)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" number: ") + .append(toIndentedString(number)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" conversations: ") + .append(toIndentedString(conversations)) + .append(newLine) + .append(" autoResponse: ") + .append(toIndentedString(autoResponse)) + .append(newLine) + .append(" blockListConfiguration: ") + .append(toIndentedString(blockListConfiguration)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesZaloFollowerMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesZaloFollowerMoActionDocs.java new file mode 100644 index 0000000..515dca7 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesZaloFollowerMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesZaloFollowerMoHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesZaloFollowerMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesZaloFollowerMoActionDocs} instance. + */ + public ResourcesZaloFollowerMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesZaloFollowerMoActionDocs resourcesZaloFollowerMoActionDocs = (ResourcesZaloFollowerMoActionDocs) o; + return Objects.equals(this.type, resourcesZaloFollowerMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesZaloFollowerMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesZaloFollowerMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesZaloFollowerMoConfigurationRequest.java new file mode 100644 index 0000000..2d10971 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesZaloFollowerMoConfigurationRequest.java @@ -0,0 +1,232 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesZaloFollowerMoConfigurationRequest model. + */ +public class ResourcesZaloFollowerMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private String resource; + + private ResourcesZaloFollowerMoActionDocs forwarding; + + private ResourcesPlatformDocs platform; + + /** + * Constructs a new {@link ResourcesZaloFollowerMoConfigurationRequest} instance. + */ + public ResourcesZaloFollowerMoConfigurationRequest() { + super("ZALO_FOLLOWER"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesZaloFollowerMoConfigurationRequest instance}. + */ + public ResourcesZaloFollowerMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesZaloFollowerMoConfigurationRequest instance}. + */ + public ResourcesZaloFollowerMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesZaloFollowerMoConfigurationRequest instance}. + */ + public ResourcesZaloFollowerMoConfigurationRequest forwarding(ResourcesZaloFollowerMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesZaloFollowerMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesZaloFollowerMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesZaloFollowerMoConfigurationRequest instance}. + */ + public ResourcesZaloFollowerMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesZaloFollowerMoConfigurationRequest resourcesZaloFollowerMoConfigurationRequest = + (ResourcesZaloFollowerMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesZaloFollowerMoConfigurationRequest.resourceKey) + && Objects.equals(this.resource, resourcesZaloFollowerMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesZaloFollowerMoConfigurationRequest.forwarding) + && Objects.equals(this.platform, resourcesZaloFollowerMoConfigurationRequest.platform) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, resource, forwarding, platform, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesZaloFollowerMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesZaloFollowerMoHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesZaloFollowerMoHttpForwardDocs.java new file mode 100644 index 0000000..503538d --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesZaloFollowerMoHttpForwardDocs.java @@ -0,0 +1,164 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesZaloFollowerMoHttpForwardDocs model. + */ +public class ResourcesZaloFollowerMoHttpForwardDocs extends ResourcesZaloFollowerMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesZaloFollowerMoHttpForwardDocs} instance. + */ + public ResourcesZaloFollowerMoHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesZaloFollowerMoHttpForwardDocs instance}. + */ + public ResourcesZaloFollowerMoHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesZaloFollowerMoHttpForwardDocs instance}. + */ + public ResourcesZaloFollowerMoHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesZaloFollowerMoHttpForwardDocs resourcesZaloFollowerMoHttpForwardDocs = + (ResourcesZaloFollowerMoHttpForwardDocs) o; + return Objects.equals(this.url, resourcesZaloFollowerMoHttpForwardDocs.url) + && Objects.equals(this.format, resourcesZaloFollowerMoHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesZaloFollowerMoHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesZaloZnsMoActionDocs.java b/src/main/java/com/infobip/model/ResourcesZaloZnsMoActionDocs.java new file mode 100644 index 0000000..2b6d409 --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesZaloZnsMoActionDocs.java @@ -0,0 +1,87 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Forwarding MO action. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesZaloZnsMoHttpForwardDocs.class, name = "HTTP_FORWARD"), +}) +public abstract class ResourcesZaloZnsMoActionDocs { + + protected final MoActionType type; + + /** + * Constructs a new {@link ResourcesZaloZnsMoActionDocs} instance. + */ + public ResourcesZaloZnsMoActionDocs(String type) { + this.type = MoActionType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public MoActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesZaloZnsMoActionDocs resourcesZaloZnsMoActionDocs = (ResourcesZaloZnsMoActionDocs) o; + return Objects.equals(this.type, resourcesZaloZnsMoActionDocs.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesZaloZnsMoActionDocs {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesZaloZnsMoConfigurationRequest.java b/src/main/java/com/infobip/model/ResourcesZaloZnsMoConfigurationRequest.java new file mode 100644 index 0000000..9465c5d --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesZaloZnsMoConfigurationRequest.java @@ -0,0 +1,232 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesZaloZnsMoConfigurationRequest model. + */ +public class ResourcesZaloZnsMoConfigurationRequest extends ResourcesMoConfigurationRequest { + + private String resourceKey; + + private String resource; + + private ResourcesZaloZnsMoActionDocs forwarding; + + private ResourcesPlatformDocs platform; + + /** + * Constructs a new {@link ResourcesZaloZnsMoConfigurationRequest} instance. + */ + public ResourcesZaloZnsMoConfigurationRequest() { + super("ZALO_ZNS"); + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + * @return This {@link ResourcesZaloZnsMoConfigurationRequest instance}. + */ + public ResourcesZaloZnsMoConfigurationRequest resourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + /** + * Returns resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @return resourceKey + */ + @JsonProperty("resourceKey") + public String getResourceKey() { + return resourceKey; + } + + /** + * Sets resourceKey. + *

+ * Field description: + * Required if <code>resource</code> not present. + * + * @param resourceKey + */ + @JsonProperty("resourceKey") + public void setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + * @return This {@link ResourcesZaloZnsMoConfigurationRequest instance}. + */ + public ResourcesZaloZnsMoConfigurationRequest resource(String resource) { + this.resource = resource; + return this; + } + + /** + * Returns resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @return resource + */ + @JsonProperty("resource") + public String getResource() { + return resource; + } + + /** + * Sets resource. + *

+ * Field description: + * Required if <code>resourceKey</code> not present. + * + * @param resource + */ + @JsonProperty("resource") + public void setResource(String resource) { + this.resource = resource; + } + + /** + * Sets forwarding. + * + * @param forwarding + * @return This {@link ResourcesZaloZnsMoConfigurationRequest instance}. + */ + public ResourcesZaloZnsMoConfigurationRequest forwarding(ResourcesZaloZnsMoActionDocs forwarding) { + this.forwarding = forwarding; + return this; + } + + /** + * Returns forwarding. + * + * @return forwarding + */ + @JsonProperty("forwarding") + public ResourcesZaloZnsMoActionDocs getForwarding() { + return forwarding; + } + + /** + * Sets forwarding. + * + * @param forwarding + */ + @JsonProperty("forwarding") + public void setForwarding(ResourcesZaloZnsMoActionDocs forwarding) { + this.forwarding = forwarding; + } + + /** + * Sets platform. + * + * @param platform + * @return This {@link ResourcesZaloZnsMoConfigurationRequest instance}. + */ + public ResourcesZaloZnsMoConfigurationRequest platform(ResourcesPlatformDocs platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public ResourcesPlatformDocs getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(ResourcesPlatformDocs platform) { + this.platform = platform; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesZaloZnsMoConfigurationRequest resourcesZaloZnsMoConfigurationRequest = + (ResourcesZaloZnsMoConfigurationRequest) o; + return Objects.equals(this.resourceKey, resourcesZaloZnsMoConfigurationRequest.resourceKey) + && Objects.equals(this.resource, resourcesZaloZnsMoConfigurationRequest.resource) + && Objects.equals(this.forwarding, resourcesZaloZnsMoConfigurationRequest.forwarding) + && Objects.equals(this.platform, resourcesZaloZnsMoConfigurationRequest.platform) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(resourceKey, resource, forwarding, platform, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesZaloZnsMoConfigurationRequest {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" resourceKey: ") + .append(toIndentedString(resourceKey)) + .append(newLine) + .append(" resource: ") + .append(toIndentedString(resource)) + .append(newLine) + .append(" forwarding: ") + .append(toIndentedString(forwarding)) + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ResourcesZaloZnsMoHttpForwardDocs.java b/src/main/java/com/infobip/model/ResourcesZaloZnsMoHttpForwardDocs.java new file mode 100644 index 0000000..a70d7ee --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesZaloZnsMoHttpForwardDocs.java @@ -0,0 +1,163 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents ResourcesZaloZnsMoHttpForwardDocs model. + */ +public class ResourcesZaloZnsMoHttpForwardDocs extends ResourcesZaloZnsMoActionDocs { + + private String url; + + private String format; + + /** + * Constructs a new {@link ResourcesZaloZnsMoHttpForwardDocs} instance. + */ + public ResourcesZaloZnsMoHttpForwardDocs() { + super("HTTP_FORWARD"); + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + * @return This {@link ResourcesZaloZnsMoHttpForwardDocs instance}. + */ + public ResourcesZaloZnsMoHttpForwardDocs url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * Specifies URL where message will be pushed. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + * @return This {@link ResourcesZaloZnsMoHttpForwardDocs instance}. + */ + public ResourcesZaloZnsMoHttpForwardDocs format(String format) { + this.format = format; + return this; + } + + /** + * Returns format. + *

+ * Field description: + * Specifies pushed content format. + * + * @return format + */ + @JsonProperty("format") + public String getFormat() { + return format; + } + + /** + * Sets format. + *

+ * Field description: + * Specifies pushed content format. + * + * @param format + */ + @JsonProperty("format") + public void setFormat(String format) { + this.format = format; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourcesZaloZnsMoHttpForwardDocs resourcesZaloZnsMoHttpForwardDocs = (ResourcesZaloZnsMoHttpForwardDocs) o; + return Objects.equals(this.url, resourcesZaloZnsMoHttpForwardDocs.url) + && Objects.equals(this.format, resourcesZaloZnsMoHttpForwardDocs.format) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, format, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class ResourcesZaloZnsMoHttpForwardDocs {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append(" format: ") + .append(toIndentedString(format)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/ViberOtpTemplateLanguage.java b/src/main/java/com/infobip/model/ViberOtpTemplateLanguage.java index 467da21..0a8abf4 100644 --- a/src/main/java/com/infobip/model/ViberOtpTemplateLanguage.java +++ b/src/main/java/com/infobip/model/ViberOtpTemplateLanguage.java @@ -13,7 +13,7 @@ import com.fasterxml.jackson.annotation.JsonValue; /** - * Language to be used for the template. If not set, the device language will be used. + * Template language. Must match the 'lang' parameter from template creation. If not specified (OTP templates only), defaults to device language. */ public enum ViberOtpTemplateLanguage { ENGLISH("ENGLISH"), diff --git a/src/main/java/com/infobip/model/ViberOutboundOtpTemplateContent.java b/src/main/java/com/infobip/model/ViberOutboundOtpTemplateContent.java index 09c95ba..37a27d2 100644 --- a/src/main/java/com/infobip/model/ViberOutboundOtpTemplateContent.java +++ b/src/main/java/com/infobip/model/ViberOutboundOtpTemplateContent.java @@ -19,7 +19,7 @@ */ public class ViberOutboundOtpTemplateContent extends ViberOutboundContent { - private String id; + private String templateId; private Map parameters = new HashMap<>(); @@ -33,49 +33,49 @@ public ViberOutboundOtpTemplateContent() { } /** - * Sets id. + * Sets templateId. *

* Field description: * Predefined code of a template to be sent. *

* The field is required. * - * @param id + * @param templateId * @return This {@link ViberOutboundOtpTemplateContent instance}. */ - public ViberOutboundOtpTemplateContent id(String id) { - this.id = id; + public ViberOutboundOtpTemplateContent templateId(String templateId) { + this.templateId = templateId; return this; } /** - * Returns id. + * Returns templateId. *

* Field description: * Predefined code of a template to be sent. *

* The field is required. * - * @return id + * @return templateId */ - @JsonProperty("id") - public String getId() { - return id; + @JsonProperty("templateId") + public String getTemplateId() { + return templateId; } /** - * Sets id. + * Sets templateId. *

* Field description: * Predefined code of a template to be sent. *

* The field is required. * - * @param id + * @param templateId */ - @JsonProperty("id") - public void setId(String id) { - this.id = id; + @JsonProperty("templateId") + public void setTemplateId(String templateId) { + this.templateId = templateId; } /** @@ -184,7 +184,7 @@ public boolean equals(Object o) { return false; } ViberOutboundOtpTemplateContent viberOutboundOtpTemplateContent = (ViberOutboundOtpTemplateContent) o; - return Objects.equals(this.id, viberOutboundOtpTemplateContent.id) + return Objects.equals(this.templateId, viberOutboundOtpTemplateContent.templateId) && Objects.equals(this.parameters, viberOutboundOtpTemplateContent.parameters) && Objects.equals(this.language, viberOutboundOtpTemplateContent.language) && super.equals(o); @@ -192,7 +192,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, parameters, language, super.hashCode()); + return Objects.hash(templateId, parameters, language, super.hashCode()); } @Override @@ -204,8 +204,8 @@ public String toString() { .append(" ") .append(toIndentedString(super.toString())) .append(newLine) - .append(" id: ") - .append(toIndentedString(id)) + .append(" templateId: ") + .append(toIndentedString(templateId)) .append(newLine) .append(" parameters: ") .append(toIndentedString(parameters)) diff --git a/src/main/java/com/infobip/model/WebRtcHangupSource.java b/src/main/java/com/infobip/model/WebRtcHangupSource.java index 9b5dc36..784f6cb 100644 --- a/src/main/java/com/infobip/model/WebRtcHangupSource.java +++ b/src/main/java/com/infobip/model/WebRtcHangupSource.java @@ -13,7 +13,7 @@ import com.fasterxml.jackson.annotation.JsonValue; /** - * Hangup source identifies who terminated the call: the PLATFORM, the API, or one of the participants (CALLER or CALLEE). + * Hangup source indicates who terminated the call: PLATFORM, API, or one of the participants (CALLER or CALLEE). */ public enum WebRtcHangupSource { CALLER("CALLER"), diff --git a/src/main/java/com/infobip/model/WebRtcMachineDetection.java b/src/main/java/com/infobip/model/WebRtcMachineDetection.java new file mode 100644 index 0000000..9a60bb9 --- /dev/null +++ b/src/main/java/com/infobip/model/WebRtcMachineDetection.java @@ -0,0 +1,146 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Machine detection settings for phone calls. + */ +public class WebRtcMachineDetection { + + private Boolean enabled; + + private Double detectionTime; + + /** + * Sets enabled. + *

+ * Field description: + * Enable machine detection for phone calls. When enabled, the system will attempt to detect if the call is answered by a voicemail or answering machine. + * + * @param enabled + * @return This {@link WebRtcMachineDetection instance}. + */ + public WebRtcMachineDetection enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Returns enabled. + *

+ * Field description: + * Enable machine detection for phone calls. When enabled, the system will attempt to detect if the call is answered by a voicemail or answering machine. + * + * @return enabled + */ + @JsonProperty("enabled") + public Boolean getEnabled() { + return enabled; + } + + /** + * Sets enabled. + *

+ * Field description: + * Enable machine detection for phone calls. When enabled, the system will attempt to detect if the call is answered by a voicemail or answering machine. + * + * @param enabled + */ + @JsonProperty("enabled") + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Sets detectionTime. + *

+ * Field description: + * Maximum time in seconds to wait for machine detection. Only applicable when machineDetection is enabled. + * + * @param detectionTime + * @return This {@link WebRtcMachineDetection instance}. + */ + public WebRtcMachineDetection detectionTime(Double detectionTime) { + this.detectionTime = detectionTime; + return this; + } + + /** + * Returns detectionTime. + *

+ * Field description: + * Maximum time in seconds to wait for machine detection. Only applicable when machineDetection is enabled. + * + * @return detectionTime + */ + @JsonProperty("detectionTime") + public Double getDetectionTime() { + return detectionTime; + } + + /** + * Sets detectionTime. + *

+ * Field description: + * Maximum time in seconds to wait for machine detection. Only applicable when machineDetection is enabled. + * + * @param detectionTime + */ + @JsonProperty("detectionTime") + public void setDetectionTime(Double detectionTime) { + this.detectionTime = detectionTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebRtcMachineDetection webRtcMachineDetection = (WebRtcMachineDetection) o; + return Objects.equals(this.enabled, webRtcMachineDetection.enabled) + && Objects.equals(this.detectionTime, webRtcMachineDetection.detectionTime); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, detectionTime); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WebRtcMachineDetection {") + .append(newLine) + .append(" enabled: ") + .append(toIndentedString(enabled)) + .append(newLine) + .append(" detectionTime: ") + .append(toIndentedString(detectionTime)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WebRtcMachineDetectionResult.java b/src/main/java/com/infobip/model/WebRtcMachineDetectionResult.java new file mode 100644 index 0000000..880232a --- /dev/null +++ b/src/main/java/com/infobip/model/WebRtcMachineDetectionResult.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Machine detection indicates whether the call was answered by a machine (MACHINE) or a human (HUMAN). If machine detection was not enabled or did not return a conclusive result, it will return null (NULL). + */ +public enum WebRtcMachineDetectionResult { + MACHINE("MACHINE"), + HUMAN("HUMAN"), + NULL("NULL"); + + private final String value; + + WebRtcMachineDetectionResult(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebRtcMachineDetectionResult fromValue(String value) { + for (WebRtcMachineDetectionResult enumElement : WebRtcMachineDetectionResult.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/WebRtcPhoneCallDetails.java b/src/main/java/com/infobip/model/WebRtcPhoneCallDetails.java index 2540244..f9ab385 100644 --- a/src/main/java/com/infobip/model/WebRtcPhoneCallDetails.java +++ b/src/main/java/com/infobip/model/WebRtcPhoneCallDetails.java @@ -25,6 +25,8 @@ public class WebRtcPhoneCallDetails extends WebRtcCallDetails { private WebRtcHangupSource hangupSource; + private WebRtcMachineDetectionResult machineDetection; + /** * Constructs a new {@link WebRtcPhoneCallDetails} instance. */ @@ -177,6 +179,37 @@ public void setHangupSource(WebRtcHangupSource hangupSource) { this.hangupSource = hangupSource; } + /** + * Sets machineDetection. + * + * @param machineDetection + * @return This {@link WebRtcPhoneCallDetails instance}. + */ + public WebRtcPhoneCallDetails machineDetection(WebRtcMachineDetectionResult machineDetection) { + this.machineDetection = machineDetection; + return this; + } + + /** + * Returns machineDetection. + * + * @return machineDetection + */ + @JsonProperty("machineDetection") + public WebRtcMachineDetectionResult getMachineDetection() { + return machineDetection; + } + + /** + * Sets machineDetection. + * + * @param machineDetection + */ + @JsonProperty("machineDetection") + public void setMachineDetection(WebRtcMachineDetectionResult machineDetection) { + this.machineDetection = machineDetection; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -190,12 +223,13 @@ public boolean equals(Object o) { && Objects.equals(this.callee, webRtcPhoneCallDetails.callee) && Objects.equals(this.dialogId, webRtcPhoneCallDetails.dialogId) && Objects.equals(this.hangupSource, webRtcPhoneCallDetails.hangupSource) + && Objects.equals(this.machineDetection, webRtcPhoneCallDetails.machineDetection) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(caller, callee, dialogId, hangupSource, super.hashCode()); + return Objects.hash(caller, callee, dialogId, hangupSource, machineDetection, super.hashCode()); } @Override @@ -219,6 +253,9 @@ public String toString() { .append(" hangupSource: ") .append(toIndentedString(hangupSource)) .append(newLine) + .append(" machineDetection: ") + .append(toIndentedString(machineDetection)) + .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/WebRtcPhoneDestination.java b/src/main/java/com/infobip/model/WebRtcPhoneDestination.java index 8c2faef..32fe6d9 100644 --- a/src/main/java/com/infobip/model/WebRtcPhoneDestination.java +++ b/src/main/java/com/infobip/model/WebRtcPhoneDestination.java @@ -25,6 +25,8 @@ public class WebRtcPhoneDestination extends WebRtcDestination { private WebRtcHangupRestriction hangupRestriction; + private WebRtcMachineDetection machineDetection; + /** * Constructs a new {@link WebRtcPhoneDestination} instance. */ @@ -189,6 +191,37 @@ public void setHangupRestriction(WebRtcHangupRestriction hangupRestriction) { this.hangupRestriction = hangupRestriction; } + /** + * Sets machineDetection. + * + * @param machineDetection + * @return This {@link WebRtcPhoneDestination instance}. + */ + public WebRtcPhoneDestination machineDetection(WebRtcMachineDetection machineDetection) { + this.machineDetection = machineDetection; + return this; + } + + /** + * Returns machineDetection. + * + * @return machineDetection + */ + @JsonProperty("machineDetection") + public WebRtcMachineDetection getMachineDetection() { + return machineDetection; + } + + /** + * Sets machineDetection. + * + * @param machineDetection + */ + @JsonProperty("machineDetection") + public void setMachineDetection(WebRtcMachineDetection machineDetection) { + this.machineDetection = machineDetection; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -202,12 +235,13 @@ public boolean equals(Object o) { && Objects.equals(this.from, webRtcPhoneDestination.from) && Objects.equals(this.displayName, webRtcPhoneDestination.displayName) && Objects.equals(this.hangupRestriction, webRtcPhoneDestination.hangupRestriction) + && Objects.equals(this.machineDetection, webRtcPhoneDestination.machineDetection) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(phoneNumber, from, displayName, hangupRestriction, super.hashCode()); + return Objects.hash(phoneNumber, from, displayName, hangupRestriction, machineDetection, super.hashCode()); } @Override @@ -231,6 +265,9 @@ public String toString() { .append(" hangupRestriction: ") .append(toIndentedString(hangupRestriction)) .append(newLine) + .append(" machineDetection: ") + .append(toIndentedString(machineDetection)) + .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/WhatsAppCallingPermissionAction.java b/src/main/java/com/infobip/model/WhatsAppCallingPermissionAction.java new file mode 100644 index 0000000..f3312f8 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppCallingPermissionAction.java @@ -0,0 +1,222 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * A list of actions a sender may undertake to facilitate a call permission or a business initiated call. + */ +public class WhatsAppCallingPermissionAction { + + private WhatsAppCallingPermissionActionName name; + + private Boolean canPerformAction; + + private List limits = new ArrayList<>(); + + /** + * Sets name. + *

+ * The field is required. + * + * @param name + * @return This {@link WhatsAppCallingPermissionAction instance}. + */ + public WhatsAppCallingPermissionAction name(WhatsAppCallingPermissionActionName name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * The field is required. + * + * @return name + */ + @JsonProperty("name") + public WhatsAppCallingPermissionActionName getName() { + return name; + } + + /** + * Sets name. + *

+ * The field is required. + * + * @param name + */ + @JsonProperty("name") + public void setName(WhatsAppCallingPermissionActionName name) { + this.name = name; + } + + /** + * Sets canPerformAction. + *

+ * Field description: + * Whether the action can be performed now, taking into account all limits. + *

+ * The field is required. + * + * @param canPerformAction + * @return This {@link WhatsAppCallingPermissionAction instance}. + */ + public WhatsAppCallingPermissionAction canPerformAction(Boolean canPerformAction) { + this.canPerformAction = canPerformAction; + return this; + } + + /** + * Returns canPerformAction. + *

+ * Field description: + * Whether the action can be performed now, taking into account all limits. + *

+ * The field is required. + * + * @return canPerformAction + */ + @JsonProperty("canPerformAction") + public Boolean getCanPerformAction() { + return canPerformAction; + } + + /** + * Sets canPerformAction. + *

+ * Field description: + * Whether the action can be performed now, taking into account all limits. + *

+ * The field is required. + * + * @param canPerformAction + */ + @JsonProperty("canPerformAction") + public void setCanPerformAction(Boolean canPerformAction) { + this.canPerformAction = canPerformAction; + } + + /** + * Sets limits. + *

+ * Field description: + * A list of time-bound restrictions for the given action. + *

+ * The field is required. + * + * @param limits + * @return This {@link WhatsAppCallingPermissionAction instance}. + */ + public WhatsAppCallingPermissionAction limits(List limits) { + this.limits = limits; + return this; + } + + /** + * Adds and item into limits. + *

+ * Field description: + * A list of time-bound restrictions for the given action. + *

+ * The field is required. + * + * @param limitsItem The item to be added to the list. + * @return This {@link WhatsAppCallingPermissionAction instance}. + */ + public WhatsAppCallingPermissionAction addLimitsItem(WhatsAppCallingPermissionActionLimit limitsItem) { + if (this.limits == null) { + this.limits = new ArrayList<>(); + } + this.limits.add(limitsItem); + return this; + } + + /** + * Returns limits. + *

+ * Field description: + * A list of time-bound restrictions for the given action. + *

+ * The field is required. + * + * @return limits + */ + @JsonProperty("limits") + public List getLimits() { + return limits; + } + + /** + * Sets limits. + *

+ * Field description: + * A list of time-bound restrictions for the given action. + *

+ * The field is required. + * + * @param limits + */ + @JsonProperty("limits") + public void setLimits(List limits) { + this.limits = limits; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppCallingPermissionAction whatsAppCallingPermissionAction = (WhatsAppCallingPermissionAction) o; + return Objects.equals(this.name, whatsAppCallingPermissionAction.name) + && Objects.equals(this.canPerformAction, whatsAppCallingPermissionAction.canPerformAction) + && Objects.equals(this.limits, whatsAppCallingPermissionAction.limits); + } + + @Override + public int hashCode() { + return Objects.hash(name, canPerformAction, limits); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppCallingPermissionAction {") + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" canPerformAction: ") + .append(toIndentedString(canPerformAction)) + .append(newLine) + .append(" limits: ") + .append(toIndentedString(limits)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppCallingPermissionActionLimit.java b/src/main/java/com/infobip/model/WhatsAppCallingPermissionActionLimit.java new file mode 100644 index 0000000..3530d92 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppCallingPermissionActionLimit.java @@ -0,0 +1,258 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * A list of time-bound restrictions for the given action. + */ +public class WhatsAppCallingPermissionActionLimit { + + private String timePeriod; + + private Integer maxAllowed; + + private Integer currentUsage; + + private OffsetDateTime limitExpirationTime; + + /** + * Sets timePeriod. + *

+ * Field description: + * Duration for which the limitation is applied in ISO 8601 format. + *

+ * The field is required. + * + * @param timePeriod + * @return This {@link WhatsAppCallingPermissionActionLimit instance}. + */ + public WhatsAppCallingPermissionActionLimit timePeriod(String timePeriod) { + this.timePeriod = timePeriod; + return this; + } + + /** + * Returns timePeriod. + *

+ * Field description: + * Duration for which the limitation is applied in ISO 8601 format. + *

+ * The field is required. + * + * @return timePeriod + */ + @JsonProperty("timePeriod") + public String getTimePeriod() { + return timePeriod; + } + + /** + * Sets timePeriod. + *

+ * Field description: + * Duration for which the limitation is applied in ISO 8601 format. + *

+ * The field is required. + * + * @param timePeriod + */ + @JsonProperty("timePeriod") + public void setTimePeriod(String timePeriod) { + this.timePeriod = timePeriod; + } + + /** + * Sets maxAllowed. + *

+ * Field description: + * The maximum number of actions allowed within the specified time period. + *

+ * The field is required. + * + * @param maxAllowed + * @return This {@link WhatsAppCallingPermissionActionLimit instance}. + */ + public WhatsAppCallingPermissionActionLimit maxAllowed(Integer maxAllowed) { + this.maxAllowed = maxAllowed; + return this; + } + + /** + * Returns maxAllowed. + *

+ * Field description: + * The maximum number of actions allowed within the specified time period. + *

+ * The field is required. + * + * @return maxAllowed + */ + @JsonProperty("maxAllowed") + public Integer getMaxAllowed() { + return maxAllowed; + } + + /** + * Sets maxAllowed. + *

+ * Field description: + * The maximum number of actions allowed within the specified time period. + *

+ * The field is required. + * + * @param maxAllowed + */ + @JsonProperty("maxAllowed") + public void setMaxAllowed(Integer maxAllowed) { + this.maxAllowed = maxAllowed; + } + + /** + * Sets currentUsage. + *

+ * Field description: + * The current number of actions the business has taken within the specified time period. + *

+ * The field is required. + * + * @param currentUsage + * @return This {@link WhatsAppCallingPermissionActionLimit instance}. + */ + public WhatsAppCallingPermissionActionLimit currentUsage(Integer currentUsage) { + this.currentUsage = currentUsage; + return this; + } + + /** + * Returns currentUsage. + *

+ * Field description: + * The current number of actions the business has taken within the specified time period. + *

+ * The field is required. + * + * @return currentUsage + */ + @JsonProperty("currentUsage") + public Integer getCurrentUsage() { + return currentUsage; + } + + /** + * Sets currentUsage. + *

+ * Field description: + * The current number of actions the business has taken within the specified time period. + *

+ * The field is required. + * + * @param currentUsage + */ + @JsonProperty("currentUsage") + public void setCurrentUsage(Integer currentUsage) { + this.currentUsage = currentUsage; + } + + /** + * Sets limitExpirationTime. + *

+ * Field description: + * Time at which the limit will expire. + * + * @param limitExpirationTime + * @return This {@link WhatsAppCallingPermissionActionLimit instance}. + */ + public WhatsAppCallingPermissionActionLimit limitExpirationTime(OffsetDateTime limitExpirationTime) { + this.limitExpirationTime = limitExpirationTime; + return this; + } + + /** + * Returns limitExpirationTime. + *

+ * Field description: + * Time at which the limit will expire. + * + * @return limitExpirationTime + */ + @JsonProperty("limitExpirationTime") + public OffsetDateTime getLimitExpirationTime() { + return limitExpirationTime; + } + + /** + * Sets limitExpirationTime. + *

+ * Field description: + * Time at which the limit will expire. + * + * @param limitExpirationTime + */ + @JsonProperty("limitExpirationTime") + public void setLimitExpirationTime(OffsetDateTime limitExpirationTime) { + this.limitExpirationTime = limitExpirationTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppCallingPermissionActionLimit whatsAppCallingPermissionActionLimit = + (WhatsAppCallingPermissionActionLimit) o; + return Objects.equals(this.timePeriod, whatsAppCallingPermissionActionLimit.timePeriod) + && Objects.equals(this.maxAllowed, whatsAppCallingPermissionActionLimit.maxAllowed) + && Objects.equals(this.currentUsage, whatsAppCallingPermissionActionLimit.currentUsage) + && Objects.equals(this.limitExpirationTime, whatsAppCallingPermissionActionLimit.limitExpirationTime); + } + + @Override + public int hashCode() { + return Objects.hash(timePeriod, maxAllowed, currentUsage, limitExpirationTime); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppCallingPermissionActionLimit {") + .append(newLine) + .append(" timePeriod: ") + .append(toIndentedString(timePeriod)) + .append(newLine) + .append(" maxAllowed: ") + .append(toIndentedString(maxAllowed)) + .append(newLine) + .append(" currentUsage: ") + .append(toIndentedString(currentUsage)) + .append(newLine) + .append(" limitExpirationTime: ") + .append(toIndentedString(limitExpirationTime)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppCallingPermissionActionName.java b/src/main/java/com/infobip/model/WhatsAppCallingPermissionActionName.java new file mode 100644 index 0000000..051040e --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppCallingPermissionActionName.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Name of calling permission related action.<br>`START_CALL` - The action of establishing a new call with the end user.<br>`SEND_CALL_PERMISSION_REQUEST` - The action of sending new call permissions request messages to end user. + */ +public enum WhatsAppCallingPermissionActionName { + START_CALL("START_CALL"), + SEND_CALL_PERMISSION_REQUEST("SEND_CALL_PERMISSION_REQUEST"); + + private final String value; + + WhatsAppCallingPermissionActionName(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WhatsAppCallingPermissionActionName fromValue(String value) { + for (WhatsAppCallingPermissionActionName enumElement : WhatsAppCallingPermissionActionName.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppCallingPermissionResponse.java b/src/main/java/com/infobip/model/WhatsAppCallingPermissionResponse.java new file mode 100644 index 0000000..9ecd855 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppCallingPermissionResponse.java @@ -0,0 +1,217 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents WhatsAppCallingPermissionResponse model. + */ +public class WhatsAppCallingPermissionResponse { + + private WhatsAppCallingPermissionStatus status; + + private List actions = new ArrayList<>(); + + private OffsetDateTime expirationTime; + + /** + * Sets status. + *

+ * The field is required. + * + * @param status + * @return This {@link WhatsAppCallingPermissionResponse instance}. + */ + public WhatsAppCallingPermissionResponse status(WhatsAppCallingPermissionStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + *

+ * The field is required. + * + * @return status + */ + @JsonProperty("status") + public WhatsAppCallingPermissionStatus getStatus() { + return status; + } + + /** + * Sets status. + *

+ * The field is required. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(WhatsAppCallingPermissionStatus status) { + this.status = status; + } + + /** + * Sets actions. + *

+ * Field description: + * A list of actions a sender may undertake to facilitate a call permission or a business initiated call. + *

+ * The field is required. + * + * @param actions + * @return This {@link WhatsAppCallingPermissionResponse instance}. + */ + public WhatsAppCallingPermissionResponse actions(List actions) { + this.actions = actions; + return this; + } + + /** + * Adds and item into actions. + *

+ * Field description: + * A list of actions a sender may undertake to facilitate a call permission or a business initiated call. + *

+ * The field is required. + * + * @param actionsItem The item to be added to the list. + * @return This {@link WhatsAppCallingPermissionResponse instance}. + */ + public WhatsAppCallingPermissionResponse addActionsItem(WhatsAppCallingPermissionAction actionsItem) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.add(actionsItem); + return this; + } + + /** + * Returns actions. + *

+ * Field description: + * A list of actions a sender may undertake to facilitate a call permission or a business initiated call. + *

+ * The field is required. + * + * @return actions + */ + @JsonProperty("actions") + public List getActions() { + return actions; + } + + /** + * Sets actions. + *

+ * Field description: + * A list of actions a sender may undertake to facilitate a call permission or a business initiated call. + *

+ * The field is required. + * + * @param actions + */ + @JsonProperty("actions") + public void setActions(List actions) { + this.actions = actions; + } + + /** + * Sets expirationTime. + *

+ * Field description: + * Time at which the calling permission will expire. Present only when `TEMPORARY` permission is granted. + * + * @param expirationTime + * @return This {@link WhatsAppCallingPermissionResponse instance}. + */ + public WhatsAppCallingPermissionResponse expirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + /** + * Returns expirationTime. + *

+ * Field description: + * Time at which the calling permission will expire. Present only when `TEMPORARY` permission is granted. + * + * @return expirationTime + */ + @JsonProperty("expirationTime") + public OffsetDateTime getExpirationTime() { + return expirationTime; + } + + /** + * Sets expirationTime. + *

+ * Field description: + * Time at which the calling permission will expire. Present only when `TEMPORARY` permission is granted. + * + * @param expirationTime + */ + @JsonProperty("expirationTime") + public void setExpirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppCallingPermissionResponse whatsAppCallingPermissionResponse = (WhatsAppCallingPermissionResponse) o; + return Objects.equals(this.status, whatsAppCallingPermissionResponse.status) + && Objects.equals(this.actions, whatsAppCallingPermissionResponse.actions) + && Objects.equals(this.expirationTime, whatsAppCallingPermissionResponse.expirationTime); + } + + @Override + public int hashCode() { + return Objects.hash(status, actions, expirationTime); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppCallingPermissionResponse {") + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" actions: ") + .append(toIndentedString(actions)) + .append(newLine) + .append(" expirationTime: ") + .append(toIndentedString(expirationTime)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppCallingPermissionStatus.java b/src/main/java/com/infobip/model/WhatsAppCallingPermissionStatus.java new file mode 100644 index 0000000..65547c5 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppCallingPermissionStatus.java @@ -0,0 +1,48 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The current status of sender's calling permission.<br>`NO_PERMISSION` - The end user has not granted calling permission to the sender.<br>`TEMPORARY` - The end user has granted a temporary calling permission to the sender.<br>`PERMANENT` - The end user has granted permanent calling permission to the sender. + */ +public enum WhatsAppCallingPermissionStatus { + NO_PERMISSION("NO_PERMISSION"), + TEMPORARY("TEMPORARY"), + PERMANENT("PERMANENT"); + + private final String value; + + WhatsAppCallingPermissionStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WhatsAppCallingPermissionStatus fromValue(String value) { + for (WhatsAppCallingPermissionStatus enumElement : WhatsAppCallingPermissionStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppConversionDetails.java b/src/main/java/com/infobip/model/WhatsAppConversionDetails.java new file mode 100644 index 0000000..84396a5 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppConversionDetails.java @@ -0,0 +1,158 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Details should contain value and currency information indicating exact value of the conversion that happened. + */ +public class WhatsAppConversionDetails { + + private String currency; + + private Double value; + + /** + * Sets currency. + *

+ * Field description: + * Currency of the conversion. Has to be the same as it is set on ad account. + *

+ * The field is required. + * + * @param currency + * @return This {@link WhatsAppConversionDetails instance}. + */ + public WhatsAppConversionDetails currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Returns currency. + *

+ * Field description: + * Currency of the conversion. Has to be the same as it is set on ad account. + *

+ * The field is required. + * + * @return currency + */ + @JsonProperty("currency") + public String getCurrency() { + return currency; + } + + /** + * Sets currency. + *

+ * Field description: + * Currency of the conversion. Has to be the same as it is set on ad account. + *

+ * The field is required. + * + * @param currency + */ + @JsonProperty("currency") + public void setCurrency(String currency) { + this.currency = currency; + } + + /** + * Sets value. + *

+ * Field description: + * Value of the conversion. Can be 0. + *

+ * The field is required. + * + * @param value + * @return This {@link WhatsAppConversionDetails instance}. + */ + public WhatsAppConversionDetails value(Double value) { + this.value = value; + return this; + } + + /** + * Returns value. + *

+ * Field description: + * Value of the conversion. Can be 0. + *

+ * The field is required. + * + * @return value + */ + @JsonProperty("value") + public Double getValue() { + return value; + } + + /** + * Sets value. + *

+ * Field description: + * Value of the conversion. Can be 0. + *

+ * The field is required. + * + * @param value + */ + @JsonProperty("value") + public void setValue(Double value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppConversionDetails whatsAppConversionDetails = (WhatsAppConversionDetails) o; + return Objects.equals(this.currency, whatsAppConversionDetails.currency) + && Objects.equals(this.value, whatsAppConversionDetails.value); + } + + @Override + public int hashCode() { + return Objects.hash(currency, value); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppConversionDetails {") + .append(newLine) + .append(" currency: ") + .append(toIndentedString(currency)) + .append(newLine) + .append(" value: ") + .append(toIndentedString(value)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppDefaultEventRequestOptions.java b/src/main/java/com/infobip/model/WhatsAppDefaultEventRequestOptions.java new file mode 100644 index 0000000..8856699 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppDefaultEventRequestOptions.java @@ -0,0 +1,91 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Options applicable to all events in the request. + */ +public class WhatsAppDefaultEventRequestOptions { + + private WhatsAppRequestSchedulingSettings schedule; + + /** + * Sets schedule. + * + * @param schedule + * @return This {@link WhatsAppDefaultEventRequestOptions instance}. + */ + public WhatsAppDefaultEventRequestOptions schedule(WhatsAppRequestSchedulingSettings schedule) { + this.schedule = schedule; + return this; + } + + /** + * Returns schedule. + * + * @return schedule + */ + @JsonProperty("schedule") + public WhatsAppRequestSchedulingSettings getSchedule() { + return schedule; + } + + /** + * Sets schedule. + * + * @param schedule + */ + @JsonProperty("schedule") + public void setSchedule(WhatsAppRequestSchedulingSettings schedule) { + this.schedule = schedule; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppDefaultEventRequestOptions whatsAppDefaultEventRequestOptions = (WhatsAppDefaultEventRequestOptions) o; + return Objects.equals(this.schedule, whatsAppDefaultEventRequestOptions.schedule); + } + + @Override + public int hashCode() { + return Objects.hash(schedule); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppDefaultEventRequestOptions {") + .append(newLine) + .append(" schedule: ") + .append(toIndentedString(schedule)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppEvent.java b/src/main/java/com/infobip/model/WhatsAppEvent.java new file mode 100644 index 0000000..964ae1c --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppEvent.java @@ -0,0 +1,259 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * An array of event objects of the events to be sent. + */ +public class WhatsAppEvent { + + private String sender; + + private List destinations = new ArrayList<>(); + + private WhatsAppOutboundEventContent content; + + private WhatsAppEventOptions options; + + /** + * Sets sender. + *

+ * Field description: + * The sender ID. It can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names). + *

+ * The field is required. + * + * @param sender + * @return This {@link WhatsAppEvent instance}. + */ + public WhatsAppEvent sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Returns sender. + *

+ * Field description: + * The sender ID. It can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names). + *

+ * The field is required. + * + * @return sender + */ + @JsonProperty("sender") + public String getSender() { + return sender; + } + + /** + * Sets sender. + *

+ * Field description: + * The sender ID. It can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names). + *

+ * The field is required. + * + * @param sender + */ + @JsonProperty("sender") + public void setSender(String sender) { + this.sender = sender; + } + + /** + * Sets destinations. + *

+ * Field description: + * An array of destination objects for where the event is being sent. A valid destination is required. + *

+ * The field is required. + * + * @param destinations + * @return This {@link WhatsAppEvent instance}. + */ + public WhatsAppEvent destinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Adds and item into destinations. + *

+ * Field description: + * An array of destination objects for where the event is being sent. A valid destination is required. + *

+ * The field is required. + * + * @param destinationsItem The item to be added to the list. + * @return This {@link WhatsAppEvent instance}. + */ + public WhatsAppEvent addDestinationsItem(WhatsAppToDestination destinationsItem) { + if (this.destinations == null) { + this.destinations = new ArrayList<>(); + } + this.destinations.add(destinationsItem); + return this; + } + + /** + * Returns destinations. + *

+ * Field description: + * An array of destination objects for where the event is being sent. A valid destination is required. + *

+ * The field is required. + * + * @return destinations + */ + @JsonProperty("destinations") + public List getDestinations() { + return destinations; + } + + /** + * Sets destinations. + *

+ * Field description: + * An array of destination objects for where the event is being sent. A valid destination is required. + *

+ * The field is required. + * + * @param destinations + */ + @JsonProperty("destinations") + public void setDestinations(List destinations) { + this.destinations = destinations; + } + + /** + * Sets content. + *

+ * The field is required. + * + * @param content + * @return This {@link WhatsAppEvent instance}. + */ + public WhatsAppEvent content(WhatsAppOutboundEventContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + *

+ * The field is required. + * + * @return content + */ + @JsonProperty("content") + public WhatsAppOutboundEventContent getContent() { + return content; + } + + /** + * Sets content. + *

+ * The field is required. + * + * @param content + */ + @JsonProperty("content") + public void setContent(WhatsAppOutboundEventContent content) { + this.content = content; + } + + /** + * Sets options. + * + * @param options + * @return This {@link WhatsAppEvent instance}. + */ + public WhatsAppEvent options(WhatsAppEventOptions options) { + this.options = options; + return this; + } + + /** + * Returns options. + * + * @return options + */ + @JsonProperty("options") + public WhatsAppEventOptions getOptions() { + return options; + } + + /** + * Sets options. + * + * @param options + */ + @JsonProperty("options") + public void setOptions(WhatsAppEventOptions options) { + this.options = options; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppEvent whatsAppEvent = (WhatsAppEvent) o; + return Objects.equals(this.sender, whatsAppEvent.sender) + && Objects.equals(this.destinations, whatsAppEvent.destinations) + && Objects.equals(this.content, whatsAppEvent.content) + && Objects.equals(this.options, whatsAppEvent.options); + } + + @Override + public int hashCode() { + return Objects.hash(sender, destinations, content, options); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppEvent {") + .append(newLine) + .append(" sender: ") + .append(toIndentedString(sender)) + .append(newLine) + .append(" destinations: ") + .append(toIndentedString(destinations)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" options: ") + .append(toIndentedString(options)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppEventOptions.java b/src/main/java/com/infobip/model/WhatsAppEventOptions.java new file mode 100644 index 0000000..28e3de0 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppEventOptions.java @@ -0,0 +1,128 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Event options. + */ +public class WhatsAppEventOptions { + + private Platform platform; + + private ValidityPeriod validityPeriod; + + /** + * Sets platform. + * + * @param platform + * @return This {@link WhatsAppEventOptions instance}. + */ + public WhatsAppEventOptions platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Returns platform. + * + * @return platform + */ + @JsonProperty("platform") + public Platform getPlatform() { + return platform; + } + + /** + * Sets platform. + * + * @param platform + */ + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; + } + + /** + * Sets validityPeriod. + * + * @param validityPeriod + * @return This {@link WhatsAppEventOptions instance}. + */ + public WhatsAppEventOptions validityPeriod(ValidityPeriod validityPeriod) { + this.validityPeriod = validityPeriod; + return this; + } + + /** + * Returns validityPeriod. + * + * @return validityPeriod + */ + @JsonProperty("validityPeriod") + public ValidityPeriod getValidityPeriod() { + return validityPeriod; + } + + /** + * Sets validityPeriod. + * + * @param validityPeriod + */ + @JsonProperty("validityPeriod") + public void setValidityPeriod(ValidityPeriod validityPeriod) { + this.validityPeriod = validityPeriod; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppEventOptions whatsAppEventOptions = (WhatsAppEventOptions) o; + return Objects.equals(this.platform, whatsAppEventOptions.platform) + && Objects.equals(this.validityPeriod, whatsAppEventOptions.validityPeriod); + } + + @Override + public int hashCode() { + return Objects.hash(platform, validityPeriod); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppEventOptions {") + .append(newLine) + .append(" platform: ") + .append(toIndentedString(platform)) + .append(newLine) + .append(" validityPeriod: ") + .append(toIndentedString(validityPeriod)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppEventRequest.java b/src/main/java/com/infobip/model/WhatsAppEventRequest.java new file mode 100644 index 0000000..ce9c680 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppEventRequest.java @@ -0,0 +1,164 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents WhatsAppEventRequest model. + */ +public class WhatsAppEventRequest { + + private List events = new ArrayList<>(); + + private WhatsAppDefaultEventRequestOptions options; + + /** + * Sets events. + *

+ * Field description: + * An array of event objects of the events to be sent. + *

+ * The field is required. + * + * @param events + * @return This {@link WhatsAppEventRequest instance}. + */ + public WhatsAppEventRequest events(List events) { + this.events = events; + return this; + } + + /** + * Adds and item into events. + *

+ * Field description: + * An array of event objects of the events to be sent. + *

+ * The field is required. + * + * @param eventsItem The item to be added to the list. + * @return This {@link WhatsAppEventRequest instance}. + */ + public WhatsAppEventRequest addEventsItem(WhatsAppEvent eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * Returns events. + *

+ * Field description: + * An array of event objects of the events to be sent. + *

+ * The field is required. + * + * @return events + */ + @JsonProperty("events") + public List getEvents() { + return events; + } + + /** + * Sets events. + *

+ * Field description: + * An array of event objects of the events to be sent. + *

+ * The field is required. + * + * @param events + */ + @JsonProperty("events") + public void setEvents(List events) { + this.events = events; + } + + /** + * Sets options. + * + * @param options + * @return This {@link WhatsAppEventRequest instance}. + */ + public WhatsAppEventRequest options(WhatsAppDefaultEventRequestOptions options) { + this.options = options; + return this; + } + + /** + * Returns options. + * + * @return options + */ + @JsonProperty("options") + public WhatsAppDefaultEventRequestOptions getOptions() { + return options; + } + + /** + * Sets options. + * + * @param options + */ + @JsonProperty("options") + public void setOptions(WhatsAppDefaultEventRequestOptions options) { + this.options = options; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppEventRequest whatsAppEventRequest = (WhatsAppEventRequest) o; + return Objects.equals(this.events, whatsAppEventRequest.events) + && Objects.equals(this.options, whatsAppEventRequest.options); + } + + @Override + public int hashCode() { + return Objects.hash(events, options); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppEventRequest {") + .append(newLine) + .append(" events: ") + .append(toIndentedString(events)) + .append(newLine) + .append(" options: ") + .append(toIndentedString(options)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppImageMediaCarouselCardHeader.java b/src/main/java/com/infobip/model/WhatsAppImageMediaCarouselCardHeader.java new file mode 100644 index 0000000..8efbe2d --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppImageMediaCarouselCardHeader.java @@ -0,0 +1,117 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents WhatsAppImageMediaCarouselCardHeader model. + */ +public class WhatsAppImageMediaCarouselCardHeader extends WhatsAppMediaCarouselCardHeader { + + private String url; + + /** + * Constructs a new {@link WhatsAppImageMediaCarouselCardHeader} instance. + */ + public WhatsAppImageMediaCarouselCardHeader() { + super("IMAGE"); + } + + /** + * Sets url. + *

+ * Field description: + * URL of an image sent in the header. It is expected to be a valid URL starting with `https://` or `http://`. Supported image types are `JPG`, `JPEG`, `PNG`. Maximum image size is 5MB. + *

+ * The field is required. + * + * @param url + * @return This {@link WhatsAppImageMediaCarouselCardHeader instance}. + */ + public WhatsAppImageMediaCarouselCardHeader url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * URL of an image sent in the header. It is expected to be a valid URL starting with `https://` or `http://`. Supported image types are `JPG`, `JPEG`, `PNG`. Maximum image size is 5MB. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * URL of an image sent in the header. It is expected to be a valid URL starting with `https://` or `http://`. Supported image types are `JPG`, `JPEG`, `PNG`. Maximum image size is 5MB. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppImageMediaCarouselCardHeader whatsAppImageMediaCarouselCardHeader = + (WhatsAppImageMediaCarouselCardHeader) o; + return Objects.equals(this.url, whatsAppImageMediaCarouselCardHeader.url) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppImageMediaCarouselCardHeader {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppInteractiveBodyWhatsAppContent.java b/src/main/java/com/infobip/model/WhatsAppInteractiveBodyWhatsAppContent.java new file mode 100644 index 0000000..9854a6c --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppInteractiveBodyWhatsAppContent.java @@ -0,0 +1,107 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Body of a message containing text only. + */ +public class WhatsAppInteractiveBodyWhatsAppContent { + + private String text; + + /** + * Sets text. + *

+ * Field description: + * Content of the message body. + *

+ * The field is required. + * + * @param text + * @return This {@link WhatsAppInteractiveBodyWhatsAppContent instance}. + */ + public WhatsAppInteractiveBodyWhatsAppContent text(String text) { + this.text = text; + return this; + } + + /** + * Returns text. + *

+ * Field description: + * Content of the message body. + *

+ * The field is required. + * + * @return text + */ + @JsonProperty("text") + public String getText() { + return text; + } + + /** + * Sets text. + *

+ * Field description: + * Content of the message body. + *

+ * The field is required. + * + * @param text + */ + @JsonProperty("text") + public void setText(String text) { + this.text = text; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppInteractiveBodyWhatsAppContent whatsAppInteractiveBodyWhatsAppContent = + (WhatsAppInteractiveBodyWhatsAppContent) o; + return Objects.equals(this.text, whatsAppInteractiveBodyWhatsAppContent.text); + } + + @Override + public int hashCode() { + return Objects.hash(text); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppInteractiveBodyWhatsAppContent {") + .append(newLine) + .append(" text: ") + .append(toIndentedString(text)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppInteractiveCallPermissionRequestMessage.java b/src/main/java/com/infobip/model/WhatsAppInteractiveCallPermissionRequestMessage.java new file mode 100644 index 0000000..dac5650 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppInteractiveCallPermissionRequestMessage.java @@ -0,0 +1,463 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents WhatsAppInteractiveCallPermissionRequestMessage model. + */ +public class WhatsAppInteractiveCallPermissionRequestMessage { + + private String from; + + private String to; + + private String messageId; + + private String callbackData; + + private String notifyUrl; + + private UrlOptions urlOptions; + + private String entityId; + + private String applicationId; + + private WhatsAppMessageContext context; + + /** + * Sets from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @param from + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage from(String from) { + this.from = from; + return this; + } + + /** + * Returns from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @return from + */ + @JsonProperty("from") + public String getFrom() { + return from; + } + + /** + * Sets from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @param from + */ + @JsonProperty("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Sets to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @param to + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage to(String to) { + this.to = to; + return this; + } + + /** + * Returns to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @return to + */ + @JsonProperty("to") + public String getTo() { + return to; + } + + /** + * Sets to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @param to + */ + @JsonProperty("to") + public void setTo(String to) { + this.to = to; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @param messageId + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Returns messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @return messageId + */ + @JsonProperty("messageId") + public String getMessageId() { + return messageId; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @param messageId + */ + @JsonProperty("messageId") + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + /** + * Sets callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @param callbackData + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage callbackData(String callbackData) { + this.callbackData = callbackData; + return this; + } + + /** + * Returns callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @return callbackData + */ + @JsonProperty("callbackData") + public String getCallbackData() { + return callbackData; + } + + /** + * Sets callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @param callbackData + */ + @JsonProperty("callbackData") + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } + + /** + * Sets notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @param notifyUrl + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage notifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + return this; + } + + /** + * Returns notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @return notifyUrl + */ + @JsonProperty("notifyUrl") + public String getNotifyUrl() { + return notifyUrl; + } + + /** + * Sets notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @param notifyUrl + */ + @JsonProperty("notifyUrl") + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + /** + * Sets urlOptions. + * + * @param urlOptions + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage urlOptions(UrlOptions urlOptions) { + this.urlOptions = urlOptions; + return this; + } + + /** + * Returns urlOptions. + * + * @return urlOptions + */ + @JsonProperty("urlOptions") + public UrlOptions getUrlOptions() { + return urlOptions; + } + + /** + * Sets urlOptions. + * + * @param urlOptions + */ + @JsonProperty("urlOptions") + public void setUrlOptions(UrlOptions urlOptions) { + this.urlOptions = urlOptions; + } + + /** + * Sets entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param entityId + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param applicationId + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets context. + * + * @param context + * @return This {@link WhatsAppInteractiveCallPermissionRequestMessage instance}. + */ + public WhatsAppInteractiveCallPermissionRequestMessage context(WhatsAppMessageContext context) { + this.context = context; + return this; + } + + /** + * Returns context. + * + * @return context + */ + @JsonProperty("context") + public WhatsAppMessageContext getContext() { + return context; + } + + /** + * Sets context. + * + * @param context + */ + @JsonProperty("context") + public void setContext(WhatsAppMessageContext context) { + this.context = context; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppInteractiveCallPermissionRequestMessage whatsAppInteractiveCallPermissionRequestMessage = + (WhatsAppInteractiveCallPermissionRequestMessage) o; + return Objects.equals(this.from, whatsAppInteractiveCallPermissionRequestMessage.from) + && Objects.equals(this.to, whatsAppInteractiveCallPermissionRequestMessage.to) + && Objects.equals(this.messageId, whatsAppInteractiveCallPermissionRequestMessage.messageId) + && Objects.equals(this.callbackData, whatsAppInteractiveCallPermissionRequestMessage.callbackData) + && Objects.equals(this.notifyUrl, whatsAppInteractiveCallPermissionRequestMessage.notifyUrl) + && Objects.equals(this.urlOptions, whatsAppInteractiveCallPermissionRequestMessage.urlOptions) + && Objects.equals(this.entityId, whatsAppInteractiveCallPermissionRequestMessage.entityId) + && Objects.equals(this.applicationId, whatsAppInteractiveCallPermissionRequestMessage.applicationId) + && Objects.equals(this.context, whatsAppInteractiveCallPermissionRequestMessage.context); + } + + @Override + public int hashCode() { + return Objects.hash(from, to, messageId, callbackData, notifyUrl, urlOptions, entityId, applicationId, context); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppInteractiveCallPermissionRequestMessage {") + .append(newLine) + .append(" from: ") + .append(toIndentedString(from)) + .append(newLine) + .append(" to: ") + .append(toIndentedString(to)) + .append(newLine) + .append(" messageId: ") + .append(toIndentedString(messageId)) + .append(newLine) + .append(" callbackData: ") + .append(toIndentedString(callbackData)) + .append(newLine) + .append(" notifyUrl: ") + .append(toIndentedString(notifyUrl)) + .append(newLine) + .append(" urlOptions: ") + .append(toIndentedString(urlOptions)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" context: ") + .append(toIndentedString(context)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselAction.java b/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselAction.java new file mode 100644 index 0000000..fae9eee --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselAction.java @@ -0,0 +1,91 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Allows you to specify cards of the carousel. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = WhatsAppQuickReplyMediaCarouselAction.class, name = "QUICK_REPLY"), + @JsonSubTypes.Type(value = WhatsAppUrlMediaCarouselAction.class, name = "URL"), +}) +public abstract class WhatsAppInteractiveMediaCarouselAction { + + protected final WhatsAppMediaCarouselActionType type; + + /** + * Constructs a new {@link WhatsAppInteractiveMediaCarouselAction} instance. + */ + public WhatsAppInteractiveMediaCarouselAction(String type) { + this.type = WhatsAppMediaCarouselActionType.fromValue(type); + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public WhatsAppMediaCarouselActionType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppInteractiveMediaCarouselAction whatsAppInteractiveMediaCarouselAction = + (WhatsAppInteractiveMediaCarouselAction) o; + return Objects.equals(this.type, whatsAppInteractiveMediaCarouselAction.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppInteractiveMediaCarouselAction {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselContent.java b/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselContent.java new file mode 100644 index 0000000..ac16579 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselContent.java @@ -0,0 +1,141 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The content object to build a message that will be sent. + */ +public class WhatsAppInteractiveMediaCarouselContent { + + private WhatsAppInteractiveBodyWhatsAppContent body; + + private WhatsAppInteractiveMediaCarouselAction action; + + /** + * Sets body. + *

+ * The field is required. + * + * @param body + * @return This {@link WhatsAppInteractiveMediaCarouselContent instance}. + */ + public WhatsAppInteractiveMediaCarouselContent body(WhatsAppInteractiveBodyWhatsAppContent body) { + this.body = body; + return this; + } + + /** + * Returns body. + *

+ * The field is required. + * + * @return body + */ + @JsonProperty("body") + public WhatsAppInteractiveBodyWhatsAppContent getBody() { + return body; + } + + /** + * Sets body. + *

+ * The field is required. + * + * @param body + */ + @JsonProperty("body") + public void setBody(WhatsAppInteractiveBodyWhatsAppContent body) { + this.body = body; + } + + /** + * Sets action. + *

+ * The field is required. + * + * @param action + * @return This {@link WhatsAppInteractiveMediaCarouselContent instance}. + */ + public WhatsAppInteractiveMediaCarouselContent action(WhatsAppInteractiveMediaCarouselAction action) { + this.action = action; + return this; + } + + /** + * Returns action. + *

+ * The field is required. + * + * @return action + */ + @JsonProperty("action") + public WhatsAppInteractiveMediaCarouselAction getAction() { + return action; + } + + /** + * Sets action. + *

+ * The field is required. + * + * @param action + */ + @JsonProperty("action") + public void setAction(WhatsAppInteractiveMediaCarouselAction action) { + this.action = action; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppInteractiveMediaCarouselContent whatsAppInteractiveMediaCarouselContent = + (WhatsAppInteractiveMediaCarouselContent) o; + return Objects.equals(this.body, whatsAppInteractiveMediaCarouselContent.body) + && Objects.equals(this.action, whatsAppInteractiveMediaCarouselContent.action); + } + + @Override + public int hashCode() { + return Objects.hash(body, action); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppInteractiveMediaCarouselContent {") + .append(newLine) + .append(" body: ") + .append(toIndentedString(body)) + .append(newLine) + .append(" action: ") + .append(toIndentedString(action)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselMessage.java b/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselMessage.java new file mode 100644 index 0000000..3fea268 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppInteractiveMediaCarouselMessage.java @@ -0,0 +1,507 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents WhatsAppInteractiveMediaCarouselMessage model. + */ +public class WhatsAppInteractiveMediaCarouselMessage { + + private String from; + + private String to; + + private String messageId; + + private WhatsAppInteractiveMediaCarouselContent content; + + private String callbackData; + + private String notifyUrl; + + private UrlOptions urlOptions; + + private String entityId; + + private String applicationId; + + private WhatsAppMessageContext context; + + /** + * Sets from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @param from + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage from(String from) { + this.from = from; + return this; + } + + /** + * Returns from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @return from + */ + @JsonProperty("from") + public String getFrom() { + return from; + } + + /** + * Sets from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @param from + */ + @JsonProperty("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Sets to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @param to + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage to(String to) { + this.to = to; + return this; + } + + /** + * Returns to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @return to + */ + @JsonProperty("to") + public String getTo() { + return to; + } + + /** + * Sets to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @param to + */ + @JsonProperty("to") + public void setTo(String to) { + this.to = to; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @param messageId + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Returns messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @return messageId + */ + @JsonProperty("messageId") + public String getMessageId() { + return messageId; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @param messageId + */ + @JsonProperty("messageId") + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + /** + * Sets content. + *

+ * The field is required. + * + * @param content + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage content(WhatsAppInteractiveMediaCarouselContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + *

+ * The field is required. + * + * @return content + */ + @JsonProperty("content") + public WhatsAppInteractiveMediaCarouselContent getContent() { + return content; + } + + /** + * Sets content. + *

+ * The field is required. + * + * @param content + */ + @JsonProperty("content") + public void setContent(WhatsAppInteractiveMediaCarouselContent content) { + this.content = content; + } + + /** + * Sets callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @param callbackData + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage callbackData(String callbackData) { + this.callbackData = callbackData; + return this; + } + + /** + * Returns callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @return callbackData + */ + @JsonProperty("callbackData") + public String getCallbackData() { + return callbackData; + } + + /** + * Sets callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @param callbackData + */ + @JsonProperty("callbackData") + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } + + /** + * Sets notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @param notifyUrl + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage notifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + return this; + } + + /** + * Returns notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @return notifyUrl + */ + @JsonProperty("notifyUrl") + public String getNotifyUrl() { + return notifyUrl; + } + + /** + * Sets notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @param notifyUrl + */ + @JsonProperty("notifyUrl") + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + /** + * Sets urlOptions. + * + * @param urlOptions + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage urlOptions(UrlOptions urlOptions) { + this.urlOptions = urlOptions; + return this; + } + + /** + * Returns urlOptions. + * + * @return urlOptions + */ + @JsonProperty("urlOptions") + public UrlOptions getUrlOptions() { + return urlOptions; + } + + /** + * Sets urlOptions. + * + * @param urlOptions + */ + @JsonProperty("urlOptions") + public void setUrlOptions(UrlOptions urlOptions) { + this.urlOptions = urlOptions; + } + + /** + * Sets entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param entityId + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param applicationId + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets context. + * + * @param context + * @return This {@link WhatsAppInteractiveMediaCarouselMessage instance}. + */ + public WhatsAppInteractiveMediaCarouselMessage context(WhatsAppMessageContext context) { + this.context = context; + return this; + } + + /** + * Returns context. + * + * @return context + */ + @JsonProperty("context") + public WhatsAppMessageContext getContext() { + return context; + } + + /** + * Sets context. + * + * @param context + */ + @JsonProperty("context") + public void setContext(WhatsAppMessageContext context) { + this.context = context; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppInteractiveMediaCarouselMessage whatsAppInteractiveMediaCarouselMessage = + (WhatsAppInteractiveMediaCarouselMessage) o; + return Objects.equals(this.from, whatsAppInteractiveMediaCarouselMessage.from) + && Objects.equals(this.to, whatsAppInteractiveMediaCarouselMessage.to) + && Objects.equals(this.messageId, whatsAppInteractiveMediaCarouselMessage.messageId) + && Objects.equals(this.content, whatsAppInteractiveMediaCarouselMessage.content) + && Objects.equals(this.callbackData, whatsAppInteractiveMediaCarouselMessage.callbackData) + && Objects.equals(this.notifyUrl, whatsAppInteractiveMediaCarouselMessage.notifyUrl) + && Objects.equals(this.urlOptions, whatsAppInteractiveMediaCarouselMessage.urlOptions) + && Objects.equals(this.entityId, whatsAppInteractiveMediaCarouselMessage.entityId) + && Objects.equals(this.applicationId, whatsAppInteractiveMediaCarouselMessage.applicationId) + && Objects.equals(this.context, whatsAppInteractiveMediaCarouselMessage.context); + } + + @Override + public int hashCode() { + return Objects.hash( + from, to, messageId, content, callbackData, notifyUrl, urlOptions, entityId, applicationId, context); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppInteractiveMediaCarouselMessage {") + .append(newLine) + .append(" from: ") + .append(toIndentedString(from)) + .append(newLine) + .append(" to: ") + .append(toIndentedString(to)) + .append(newLine) + .append(" messageId: ") + .append(toIndentedString(messageId)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" callbackData: ") + .append(toIndentedString(callbackData)) + .append(newLine) + .append(" notifyUrl: ") + .append(toIndentedString(notifyUrl)) + .append(newLine) + .append(" urlOptions: ") + .append(toIndentedString(urlOptions)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" context: ") + .append(toIndentedString(context)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonContent.java b/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonContent.java new file mode 100644 index 0000000..017d72b --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonContent.java @@ -0,0 +1,136 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * The content object to build a message that will be sent. + */ +public class WhatsAppInteractiveVoiceButtonContent { + + private WhatsAppInteractiveBodyWhatsAppContent body; + + private WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent action; + + /** + * Sets body. + *

+ * The field is required. + * + * @param body + * @return This {@link WhatsAppInteractiveVoiceButtonContent instance}. + */ + public WhatsAppInteractiveVoiceButtonContent body(WhatsAppInteractiveBodyWhatsAppContent body) { + this.body = body; + return this; + } + + /** + * Returns body. + *

+ * The field is required. + * + * @return body + */ + @JsonProperty("body") + public WhatsAppInteractiveBodyWhatsAppContent getBody() { + return body; + } + + /** + * Sets body. + *

+ * The field is required. + * + * @param body + */ + @JsonProperty("body") + public void setBody(WhatsAppInteractiveBodyWhatsAppContent body) { + this.body = body; + } + + /** + * Sets action. + * + * @param action + * @return This {@link WhatsAppInteractiveVoiceButtonContent instance}. + */ + public WhatsAppInteractiveVoiceButtonContent action( + WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent action) { + this.action = action; + return this; + } + + /** + * Returns action. + * + * @return action + */ + @JsonProperty("action") + public WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent getAction() { + return action; + } + + /** + * Sets action. + * + * @param action + */ + @JsonProperty("action") + public void setAction(WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent action) { + this.action = action; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppInteractiveVoiceButtonContent whatsAppInteractiveVoiceButtonContent = + (WhatsAppInteractiveVoiceButtonContent) o; + return Objects.equals(this.body, whatsAppInteractiveVoiceButtonContent.body) + && Objects.equals(this.action, whatsAppInteractiveVoiceButtonContent.action); + } + + @Override + public int hashCode() { + return Objects.hash(body, action); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppInteractiveVoiceButtonContent {") + .append(newLine) + .append(" body: ") + .append(toIndentedString(body)) + .append(newLine) + .append(" action: ") + .append(toIndentedString(action)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonMessage.java b/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonMessage.java new file mode 100644 index 0000000..7e3f537 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonMessage.java @@ -0,0 +1,469 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents WhatsAppInteractiveVoiceButtonMessage model. + */ +public class WhatsAppInteractiveVoiceButtonMessage { + + private String from; + + private String to; + + private String messageId; + + private WhatsAppInteractiveVoiceButtonContent content; + + private String callbackData; + + private String notifyUrl; + + private UrlOptions urlOptions; + + private String entityId; + + private String applicationId; + + /** + * Sets from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @param from + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage from(String from) { + this.from = from; + return this; + } + + /** + * Returns from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @return from + */ + @JsonProperty("from") + public String getFrom() { + return from; + } + + /** + * Sets from. + *

+ * Field description: + * Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know). + *

+ * The field is required. + * + * @param from + */ + @JsonProperty("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Sets to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @param to + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage to(String to) { + this.to = to; + return this; + } + + /** + * Returns to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @return to + */ + @JsonProperty("to") + public String getTo() { + return to; + } + + /** + * Sets to. + *

+ * Field description: + * Message recipient number. Must be in international format. + *

+ * The field is required. + * + * @param to + */ + @JsonProperty("to") + public void setTo(String to) { + this.to = to; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @param messageId + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Returns messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @return messageId + */ + @JsonProperty("messageId") + public String getMessageId() { + return messageId; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @param messageId + */ + @JsonProperty("messageId") + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + /** + * Sets content. + *

+ * The field is required. + * + * @param content + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage content(WhatsAppInteractiveVoiceButtonContent content) { + this.content = content; + return this; + } + + /** + * Returns content. + *

+ * The field is required. + * + * @return content + */ + @JsonProperty("content") + public WhatsAppInteractiveVoiceButtonContent getContent() { + return content; + } + + /** + * Sets content. + *

+ * The field is required. + * + * @param content + */ + @JsonProperty("content") + public void setContent(WhatsAppInteractiveVoiceButtonContent content) { + this.content = content; + } + + /** + * Sets callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @param callbackData + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage callbackData(String callbackData) { + this.callbackData = callbackData; + return this; + } + + /** + * Returns callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @return callbackData + */ + @JsonProperty("callbackData") + public String getCallbackData() { + return callbackData; + } + + /** + * Sets callbackData. + *

+ * Field description: + * Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports). + * + * @param callbackData + */ + @JsonProperty("callbackData") + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } + + /** + * Sets notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @param notifyUrl + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage notifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + return this; + } + + /** + * Returns notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @return notifyUrl + */ + @JsonProperty("notifyUrl") + public String getNotifyUrl() { + return notifyUrl; + } + + /** + * Sets notifyUrl. + *

+ * Field description: + * The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports). + * + * @param notifyUrl + */ + @JsonProperty("notifyUrl") + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + /** + * Sets urlOptions. + * + * @param urlOptions + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage urlOptions(UrlOptions urlOptions) { + this.urlOptions = urlOptions; + return this; + } + + /** + * Returns urlOptions. + * + * @return urlOptions + */ + @JsonProperty("urlOptions") + public UrlOptions getUrlOptions() { + return urlOptions; + } + + /** + * Sets urlOptions. + * + * @param urlOptions + */ + @JsonProperty("urlOptions") + public void setUrlOptions(UrlOptions urlOptions) { + this.urlOptions = urlOptions; + } + + /** + * Sets entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param entityId + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * Returns entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @return entityId + */ + @JsonProperty("entityId") + public String getEntityId() { + return entityId; + } + + /** + * Sets entityId. + *

+ * Field description: + * Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param entityId + */ + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param applicationId + * @return This {@link WhatsAppInteractiveVoiceButtonMessage instance}. + */ + public WhatsAppInteractiveVoiceButtonMessage applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. + *

+ * Field description: + * Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). + * + * @param applicationId + */ + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppInteractiveVoiceButtonMessage whatsAppInteractiveVoiceButtonMessage = + (WhatsAppInteractiveVoiceButtonMessage) o; + return Objects.equals(this.from, whatsAppInteractiveVoiceButtonMessage.from) + && Objects.equals(this.to, whatsAppInteractiveVoiceButtonMessage.to) + && Objects.equals(this.messageId, whatsAppInteractiveVoiceButtonMessage.messageId) + && Objects.equals(this.content, whatsAppInteractiveVoiceButtonMessage.content) + && Objects.equals(this.callbackData, whatsAppInteractiveVoiceButtonMessage.callbackData) + && Objects.equals(this.notifyUrl, whatsAppInteractiveVoiceButtonMessage.notifyUrl) + && Objects.equals(this.urlOptions, whatsAppInteractiveVoiceButtonMessage.urlOptions) + && Objects.equals(this.entityId, whatsAppInteractiveVoiceButtonMessage.entityId) + && Objects.equals(this.applicationId, whatsAppInteractiveVoiceButtonMessage.applicationId); + } + + @Override + public int hashCode() { + return Objects.hash(from, to, messageId, content, callbackData, notifyUrl, urlOptions, entityId, applicationId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppInteractiveVoiceButtonMessage {") + .append(newLine) + .append(" from: ") + .append(toIndentedString(from)) + .append(newLine) + .append(" to: ") + .append(toIndentedString(to)) + .append(newLine) + .append(" messageId: ") + .append(toIndentedString(messageId)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" callbackData: ") + .append(toIndentedString(callbackData)) + .append(newLine) + .append(" notifyUrl: ") + .append(toIndentedString(notifyUrl)) + .append(newLine) + .append(" urlOptions: ") + .append(toIndentedString(urlOptions)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) + .append(newLine) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent.java b/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent.java new file mode 100644 index 0000000..814c30f --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent.java @@ -0,0 +1,200 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Allows you to specify message details. + */ +public class WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent { + + private String buttonDisplayText; + + private Integer callValidityPeriod; + + private String callContextPayload; + + /** + * Sets buttonDisplayText. + *

+ * Field description: + * Text to be displayed on the button. + * + * @param buttonDisplayText + * @return This {@link WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent instance}. + */ + public WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent buttonDisplayText(String buttonDisplayText) { + this.buttonDisplayText = buttonDisplayText; + return this; + } + + /** + * Returns buttonDisplayText. + *

+ * Field description: + * Text to be displayed on the button. + * + * @return buttonDisplayText + */ + @JsonProperty("buttonDisplayText") + public String getButtonDisplayText() { + return buttonDisplayText; + } + + /** + * Sets buttonDisplayText. + *

+ * Field description: + * Text to be displayed on the button. + * + * @param buttonDisplayText + */ + @JsonProperty("buttonDisplayText") + public void setButtonDisplayText(String buttonDisplayText) { + this.buttonDisplayText = buttonDisplayText; + } + + /** + * Sets callValidityPeriod. + *

+ * Field description: + * Time to live for the voice call button in minutes. Must be between 1 and 43200 (30 days). Default value is 10080 (7 days). + * + * @param callValidityPeriod + * @return This {@link WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent instance}. + */ + public WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent callValidityPeriod(Integer callValidityPeriod) { + this.callValidityPeriod = callValidityPeriod; + return this; + } + + /** + * Returns callValidityPeriod. + *

+ * Field description: + * Time to live for the voice call button in minutes. Must be between 1 and 43200 (30 days). Default value is 10080 (7 days). + * + * @return callValidityPeriod + */ + @JsonProperty("callValidityPeriod") + public Integer getCallValidityPeriod() { + return callValidityPeriod; + } + + /** + * Sets callValidityPeriod. + *

+ * Field description: + * Time to live for the voice call button in minutes. Must be between 1 and 43200 (30 days). Default value is 10080 (7 days). + * + * @param callValidityPeriod + */ + @JsonProperty("callValidityPeriod") + public void setCallValidityPeriod(Integer callValidityPeriod) { + this.callValidityPeriod = callValidityPeriod; + } + + /** + * Sets callContextPayload. + *

+ * Field description: + * Payload data sent with the button. Can be retrieved from the call webhook. + * + * @param callContextPayload + * @return This {@link WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent instance}. + */ + public WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent callContextPayload(String callContextPayload) { + this.callContextPayload = callContextPayload; + return this; + } + + /** + * Returns callContextPayload. + *

+ * Field description: + * Payload data sent with the button. Can be retrieved from the call webhook. + * + * @return callContextPayload + */ + @JsonProperty("callContextPayload") + public String getCallContextPayload() { + return callContextPayload; + } + + /** + * Sets callContextPayload. + *

+ * Field description: + * Payload data sent with the button. Can be retrieved from the call webhook. + * + * @param callContextPayload + */ + @JsonProperty("callContextPayload") + public void setCallContextPayload(String callContextPayload) { + this.callContextPayload = callContextPayload; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent + whatsAppInteractiveVoiceButtonMessageActionWhatsAppContent = + (WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent) o; + return Objects.equals( + this.buttonDisplayText, + whatsAppInteractiveVoiceButtonMessageActionWhatsAppContent.buttonDisplayText) + && Objects.equals( + this.callValidityPeriod, + whatsAppInteractiveVoiceButtonMessageActionWhatsAppContent.callValidityPeriod) + && Objects.equals( + this.callContextPayload, + whatsAppInteractiveVoiceButtonMessageActionWhatsAppContent.callContextPayload); + } + + @Override + public int hashCode() { + return Objects.hash(buttonDisplayText, callValidityPeriod, callContextPayload); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppInteractiveVoiceButtonMessageActionWhatsAppContent {") + .append(newLine) + .append(" buttonDisplayText: ") + .append(toIndentedString(buttonDisplayText)) + .append(newLine) + .append(" callValidityPeriod: ") + .append(toIndentedString(callValidityPeriod)) + .append(newLine) + .append(" callContextPayload: ") + .append(toIndentedString(callContextPayload)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMediaCarouselActionType.java b/src/main/java/com/infobip/model/WhatsAppMediaCarouselActionType.java new file mode 100644 index 0000000..ec33359 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMediaCarouselActionType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents WhatsAppMediaCarouselActionType enumeration. + */ +public enum WhatsAppMediaCarouselActionType { + QUICK_REPLY("QUICK_REPLY"), + URL("URL"); + + private final String value; + + WhatsAppMediaCarouselActionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WhatsAppMediaCarouselActionType fromValue(String value) { + for (WhatsAppMediaCarouselActionType enumElement : WhatsAppMediaCarouselActionType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardBody.java b/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardBody.java new file mode 100644 index 0000000..c86a499 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardBody.java @@ -0,0 +1,106 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Card body. + */ +public class WhatsAppMediaCarouselCardBody { + + private String text; + + /** + * Sets text. + *

+ * Field description: + * Card body text. + *

+ * The field is required. + * + * @param text + * @return This {@link WhatsAppMediaCarouselCardBody instance}. + */ + public WhatsAppMediaCarouselCardBody text(String text) { + this.text = text; + return this; + } + + /** + * Returns text. + *

+ * Field description: + * Card body text. + *

+ * The field is required. + * + * @return text + */ + @JsonProperty("text") + public String getText() { + return text; + } + + /** + * Sets text. + *

+ * Field description: + * Card body text. + *

+ * The field is required. + * + * @param text + */ + @JsonProperty("text") + public void setText(String text) { + this.text = text; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppMediaCarouselCardBody whatsAppMediaCarouselCardBody = (WhatsAppMediaCarouselCardBody) o; + return Objects.equals(this.text, whatsAppMediaCarouselCardBody.text); + } + + @Override + public int hashCode() { + return Objects.hash(text); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppMediaCarouselCardBody {") + .append(newLine) + .append(" text: ") + .append(toIndentedString(text)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardHeader.java b/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardHeader.java new file mode 100644 index 0000000..2d8b9cf --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardHeader.java @@ -0,0 +1,90 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.util.Objects; + +/** + * Card header. Should be IMAGE or VIDEO type. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = WhatsAppImageMediaCarouselCardHeader.class, name = "IMAGE"), + @JsonSubTypes.Type(value = WhatsAppVideoMediaCarouselCardHeader.class, name = "VIDEO"), +}) +public abstract class WhatsAppMediaCarouselCardHeader { + + protected final WhatsAppMediaCarouselCardHeaderType type; + + /** + * Constructs a new {@link WhatsAppMediaCarouselCardHeader} instance. + */ + public WhatsAppMediaCarouselCardHeader(String type) { + this.type = WhatsAppMediaCarouselCardHeaderType.fromValue(type); + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public WhatsAppMediaCarouselCardHeaderType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppMediaCarouselCardHeader whatsAppMediaCarouselCardHeader = (WhatsAppMediaCarouselCardHeader) o; + return Objects.equals(this.type, whatsAppMediaCarouselCardHeader.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppMediaCarouselCardHeader {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardHeaderType.java b/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardHeaderType.java new file mode 100644 index 0000000..5882ee6 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMediaCarouselCardHeaderType.java @@ -0,0 +1,47 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents WhatsAppMediaCarouselCardHeaderType enumeration. + */ +public enum WhatsAppMediaCarouselCardHeaderType { + IMAGE("IMAGE"), + VIDEO("VIDEO"); + + private final String value; + + WhatsAppMediaCarouselCardHeaderType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WhatsAppMediaCarouselCardHeaderType fromValue(String value) { + for (WhatsAppMediaCarouselCardHeaderType enumElement : WhatsAppMediaCarouselCardHeaderType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMessageGeneralStatus.java b/src/main/java/com/infobip/model/WhatsAppMessageGeneralStatus.java new file mode 100644 index 0000000..75c82a0 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMessageGeneralStatus.java @@ -0,0 +1,51 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Status group name that describes which category the status code belongs to, i.e., [PENDING](https://www.infobip.com/docs/essentials/response-status-and-error-codes#pending-general-status-codes), [UNDELIVERABLE](https://www.infobip.com/docs/essentials/response-status-and-error-codes#undeliverable-general-status-codes), [DELIVERED](https://www.infobip.com/docs/essentials/response-status-and-error-codes#delivered-general-status-codes), [EXPIRED](https://www.infobip.com/docs/essentials/response-status-and-error-codes#expired-general-status-codes), [REJECTED](https://www.infobip.com/docs/essentials/response-status-and-error-codes#rejected-general-status-codes). + */ +public enum WhatsAppMessageGeneralStatus { + ACCEPTED("ACCEPTED"), + PENDING("PENDING"), + UNDELIVERABLE("UNDELIVERABLE"), + DELIVERED("DELIVERED"), + EXPIRED("EXPIRED"), + REJECTED("REJECTED"); + + private final String value; + + WhatsAppMessageGeneralStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WhatsAppMessageGeneralStatus fromValue(String value) { + for (WhatsAppMessageGeneralStatus enumElement : WhatsAppMessageGeneralStatus.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMessageResponseMessageResponseDetails.java b/src/main/java/com/infobip/model/WhatsAppMessageResponseMessageResponseDetails.java new file mode 100644 index 0000000..054e2f2 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMessageResponseMessageResponseDetails.java @@ -0,0 +1,230 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * An array of message objects of a single message or multiple messages sent under one bulk ID. + */ +public class WhatsAppMessageResponseMessageResponseDetails { + + private String messageId; + + private WhatsAppMessageStatus status; + + private String destination; + + private Object details; + + /** + * Sets messageId. + *

+ * Field description: + * Unique message ID. If not provided, it will be auto-generated and returned in the API response. + * + * @param messageId + * @return This {@link WhatsAppMessageResponseMessageResponseDetails instance}. + */ + public WhatsAppMessageResponseMessageResponseDetails messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Returns messageId. + *

+ * Field description: + * Unique message ID. If not provided, it will be auto-generated and returned in the API response. + * + * @return messageId + */ + @JsonProperty("messageId") + public String getMessageId() { + return messageId; + } + + /** + * Sets messageId. + *

+ * Field description: + * Unique message ID. If not provided, it will be auto-generated and returned in the API response. + * + * @param messageId + */ + @JsonProperty("messageId") + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + /** + * Sets status. + * + * @param status + * @return This {@link WhatsAppMessageResponseMessageResponseDetails instance}. + */ + public WhatsAppMessageResponseMessageResponseDetails status(WhatsAppMessageStatus status) { + this.status = status; + return this; + } + + /** + * Returns status. + * + * @return status + */ + @JsonProperty("status") + public WhatsAppMessageStatus getStatus() { + return status; + } + + /** + * Sets status. + * + * @param status + */ + @JsonProperty("status") + public void setStatus(WhatsAppMessageStatus status) { + this.status = status; + } + + /** + * Sets destination. + *

+ * Field description: + * The destination address of the message, i.e., its recipient. + * + * @param destination + * @return This {@link WhatsAppMessageResponseMessageResponseDetails instance}. + */ + public WhatsAppMessageResponseMessageResponseDetails destination(String destination) { + this.destination = destination; + return this; + } + + /** + * Returns destination. + *

+ * Field description: + * The destination address of the message, i.e., its recipient. + * + * @return destination + */ + @JsonProperty("destination") + public String getDestination() { + return destination; + } + + /** + * Sets destination. + *

+ * Field description: + * The destination address of the message, i.e., its recipient. + * + * @param destination + */ + @JsonProperty("destination") + public void setDestination(String destination) { + this.destination = destination; + } + + /** + * Sets details. + *

+ * Field description: + * Other details of the message. + * + * @param details + * @return This {@link WhatsAppMessageResponseMessageResponseDetails instance}. + */ + public WhatsAppMessageResponseMessageResponseDetails details(Object details) { + this.details = details; + return this; + } + + /** + * Returns details. + *

+ * Field description: + * Other details of the message. + * + * @return details + */ + @JsonProperty("details") + public Object getDetails() { + return details; + } + + /** + * Sets details. + *

+ * Field description: + * Other details of the message. + * + * @param details + */ + @JsonProperty("details") + public void setDetails(Object details) { + this.details = details; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppMessageResponseMessageResponseDetails whatsAppMessageResponseMessageResponseDetails = + (WhatsAppMessageResponseMessageResponseDetails) o; + return Objects.equals(this.messageId, whatsAppMessageResponseMessageResponseDetails.messageId) + && Objects.equals(this.status, whatsAppMessageResponseMessageResponseDetails.status) + && Objects.equals(this.destination, whatsAppMessageResponseMessageResponseDetails.destination) + && Objects.equals(this.details, whatsAppMessageResponseMessageResponseDetails.details); + } + + @Override + public int hashCode() { + return Objects.hash(messageId, status, destination, details); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppMessageResponseMessageResponseDetails {") + .append(newLine) + .append(" messageId: ") + .append(toIndentedString(messageId)) + .append(newLine) + .append(" status: ") + .append(toIndentedString(status)) + .append(newLine) + .append(" destination: ") + .append(toIndentedString(destination)) + .append(newLine) + .append(" details: ") + .append(toIndentedString(details)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMessageStatus.java b/src/main/java/com/infobip/model/WhatsAppMessageStatus.java new file mode 100644 index 0000000..87bc33a --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMessageStatus.java @@ -0,0 +1,321 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Indicates the [status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes) of the message and how to recover from an error should there be any. + */ +public class WhatsAppMessageStatus { + + private Integer groupId; + + private WhatsAppMessageGeneralStatus groupName; + + private Integer id; + + private String name; + + private String description; + + private String action; + + /** + * Sets groupId. + *

+ * Field description: + * Status group ID. + * + * @param groupId + * @return This {@link WhatsAppMessageStatus instance}. + */ + public WhatsAppMessageStatus groupId(Integer groupId) { + this.groupId = groupId; + return this; + } + + /** + * Returns groupId. + *

+ * Field description: + * Status group ID. + * + * @return groupId + */ + @JsonProperty("groupId") + public Integer getGroupId() { + return groupId; + } + + /** + * Sets groupId. + *

+ * Field description: + * Status group ID. + * + * @param groupId + */ + @JsonProperty("groupId") + public void setGroupId(Integer groupId) { + this.groupId = groupId; + } + + /** + * Sets groupName. + * + * @param groupName + * @return This {@link WhatsAppMessageStatus instance}. + */ + public WhatsAppMessageStatus groupName(WhatsAppMessageGeneralStatus groupName) { + this.groupName = groupName; + return this; + } + + /** + * Returns groupName. + * + * @return groupName + */ + @JsonProperty("groupName") + public WhatsAppMessageGeneralStatus getGroupName() { + return groupName; + } + + /** + * Sets groupName. + * + * @param groupName + */ + @JsonProperty("groupName") + public void setGroupName(WhatsAppMessageGeneralStatus groupName) { + this.groupName = groupName; + } + + /** + * Sets id. + *

+ * Field description: + * Status code ID. + * + * @param id + * @return This {@link WhatsAppMessageStatus instance}. + */ + public WhatsAppMessageStatus id(Integer id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * Status code ID. + * + * @return id + */ + @JsonProperty("id") + public Integer getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * Status code ID. + * + * @param id + */ + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * Sets name. + *

+ * Field description: + * [Status code](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes) name. + * + * @param name + * @return This {@link WhatsAppMessageStatus instance}. + */ + public WhatsAppMessageStatus name(String name) { + this.name = name; + return this; + } + + /** + * Returns name. + *

+ * Field description: + * [Status code](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes) name. + * + * @return name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * Sets name. + *

+ * Field description: + * [Status code](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes) name. + * + * @param name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * Sets description. + *

+ * Field description: + * Human-readable description of the status. + * + * @param description + * @return This {@link WhatsAppMessageStatus instance}. + */ + public WhatsAppMessageStatus description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Human-readable description of the status. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Human-readable description of the status. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets action. + *

+ * Field description: + * Action to take to recover from the error. + * + * @param action + * @return This {@link WhatsAppMessageStatus instance}. + */ + public WhatsAppMessageStatus action(String action) { + this.action = action; + return this; + } + + /** + * Returns action. + *

+ * Field description: + * Action to take to recover from the error. + * + * @return action + */ + @JsonProperty("action") + public String getAction() { + return action; + } + + /** + * Sets action. + *

+ * Field description: + * Action to take to recover from the error. + * + * @param action + */ + @JsonProperty("action") + public void setAction(String action) { + this.action = action; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppMessageStatus whatsAppMessageStatus = (WhatsAppMessageStatus) o; + return Objects.equals(this.groupId, whatsAppMessageStatus.groupId) + && Objects.equals(this.groupName, whatsAppMessageStatus.groupName) + && Objects.equals(this.id, whatsAppMessageStatus.id) + && Objects.equals(this.name, whatsAppMessageStatus.name) + && Objects.equals(this.description, whatsAppMessageStatus.description) + && Objects.equals(this.action, whatsAppMessageStatus.action); + } + + @Override + public int hashCode() { + return Objects.hash(groupId, groupName, id, name, description, action); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppMessageStatus {") + .append(newLine) + .append(" groupId: ") + .append(toIndentedString(groupId)) + .append(newLine) + .append(" groupName: ") + .append(toIndentedString(groupName)) + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" name: ") + .append(toIndentedString(name)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append(" action: ") + .append(toIndentedString(action)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMetaConversionModel.java b/src/main/java/com/infobip/model/WhatsAppMetaConversionModel.java new file mode 100644 index 0000000..d0ecf77 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMetaConversionModel.java @@ -0,0 +1,233 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Conversions collection. + */ +public class WhatsAppMetaConversionModel { + + private String ctwaClickId; + + private WhatsAppMetaConversionType type; + + private WhatsAppConversionDetails details; + + private OffsetDateTime conversionTime; + + /** + * Sets ctwaClickId. + *

+ * Field description: + * ctwaClickId is unique identifier of each click on the ad that clicks to WhatsApp. ctwaClickId is contained within the inbound message originating from the ad within the referral object. Check payload [here](https://www.infobip.com/docs/api/channels/whatsapp/whatsapp-inbound-messages/receive-whatsapp-inbound-messages). + *

+ * The field is required. + * + * @param ctwaClickId + * @return This {@link WhatsAppMetaConversionModel instance}. + */ + public WhatsAppMetaConversionModel ctwaClickId(String ctwaClickId) { + this.ctwaClickId = ctwaClickId; + return this; + } + + /** + * Returns ctwaClickId. + *

+ * Field description: + * ctwaClickId is unique identifier of each click on the ad that clicks to WhatsApp. ctwaClickId is contained within the inbound message originating from the ad within the referral object. Check payload [here](https://www.infobip.com/docs/api/channels/whatsapp/whatsapp-inbound-messages/receive-whatsapp-inbound-messages). + *

+ * The field is required. + * + * @return ctwaClickId + */ + @JsonProperty("ctwaClickId") + public String getCtwaClickId() { + return ctwaClickId; + } + + /** + * Sets ctwaClickId. + *

+ * Field description: + * ctwaClickId is unique identifier of each click on the ad that clicks to WhatsApp. ctwaClickId is contained within the inbound message originating from the ad within the referral object. Check payload [here](https://www.infobip.com/docs/api/channels/whatsapp/whatsapp-inbound-messages/receive-whatsapp-inbound-messages). + *

+ * The field is required. + * + * @param ctwaClickId + */ + @JsonProperty("ctwaClickId") + public void setCtwaClickId(String ctwaClickId) { + this.ctwaClickId = ctwaClickId; + } + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + * @return This {@link WhatsAppMetaConversionModel instance}. + */ + public WhatsAppMetaConversionModel type(WhatsAppMetaConversionType type) { + this.type = type; + return this; + } + + /** + * Returns type. + *

+ * The field is required. + * + * @return type + */ + @JsonProperty("type") + public WhatsAppMetaConversionType getType() { + return type; + } + + /** + * Sets type. + *

+ * The field is required. + * + * @param type + */ + @JsonProperty("type") + public void setType(WhatsAppMetaConversionType type) { + this.type = type; + } + + /** + * Sets details. + * + * @param details + * @return This {@link WhatsAppMetaConversionModel instance}. + */ + public WhatsAppMetaConversionModel details(WhatsAppConversionDetails details) { + this.details = details; + return this; + } + + /** + * Returns details. + * + * @return details + */ + @JsonProperty("details") + public WhatsAppConversionDetails getDetails() { + return details; + } + + /** + * Sets details. + * + * @param details + */ + @JsonProperty("details") + public void setDetails(WhatsAppConversionDetails details) { + this.details = details; + } + + /** + * Sets conversionTime. + *

+ * Field description: + * Time when the conversion happened. Must be in the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. Date must not be older than 7 days. If omitted then current time of submission is used. + * + * @param conversionTime + * @return This {@link WhatsAppMetaConversionModel instance}. + */ + public WhatsAppMetaConversionModel conversionTime(OffsetDateTime conversionTime) { + this.conversionTime = conversionTime; + return this; + } + + /** + * Returns conversionTime. + *

+ * Field description: + * Time when the conversion happened. Must be in the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. Date must not be older than 7 days. If omitted then current time of submission is used. + * + * @return conversionTime + */ + @JsonProperty("conversionTime") + public OffsetDateTime getConversionTime() { + return conversionTime; + } + + /** + * Sets conversionTime. + *

+ * Field description: + * Time when the conversion happened. Must be in the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. Date must not be older than 7 days. If omitted then current time of submission is used. + * + * @param conversionTime + */ + @JsonProperty("conversionTime") + public void setConversionTime(OffsetDateTime conversionTime) { + this.conversionTime = conversionTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppMetaConversionModel whatsAppMetaConversionModel = (WhatsAppMetaConversionModel) o; + return Objects.equals(this.ctwaClickId, whatsAppMetaConversionModel.ctwaClickId) + && Objects.equals(this.type, whatsAppMetaConversionModel.type) + && Objects.equals(this.details, whatsAppMetaConversionModel.details) + && Objects.equals(this.conversionTime, whatsAppMetaConversionModel.conversionTime); + } + + @Override + public int hashCode() { + return Objects.hash(ctwaClickId, type, details, conversionTime); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppMetaConversionModel {") + .append(newLine) + .append(" ctwaClickId: ") + .append(toIndentedString(ctwaClickId)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append(" details: ") + .append(toIndentedString(details)) + .append(newLine) + .append(" conversionTime: ") + .append(toIndentedString(conversionTime)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppMetaConversionType.java b/src/main/java/com/infobip/model/WhatsAppMetaConversionType.java new file mode 100644 index 0000000..a999bf8 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppMetaConversionType.java @@ -0,0 +1,59 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Type of the conversion. Can be `PURCHASE` or `LEAD_SUBMITTED`. + */ +public enum WhatsAppMetaConversionType { + PURCHASE("PURCHASE"), + LEAD_SUBMITTED("LEAD_SUBMITTED"), + INITIATE_CHECKOUT("INITIATE_CHECKOUT"), + ADD_TO_CART("ADD_TO_CART"), + VIEW_CONTENT("VIEW_CONTENT"), + ORDER_CREATED("ORDER_CREATED"), + ORDER_SHIPPED("ORDER_SHIPPED"), + ORDER_DELIVERED("ORDER_DELIVERED"), + ORDER_CANCELED("ORDER_CANCELED"), + ORDER_RETURNED("ORDER_RETURNED"), + CART_ABANDONED("CART_ABANDONED"), + QUALIFIED_LEAD("QUALIFIED_LEAD"), + RATING_PROVIDED("RATING_PROVIDED"), + REVIEW_PROVIDED("REVIEW_PROVIDED"); + + private final String value; + + WhatsAppMetaConversionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WhatsAppMetaConversionType fromValue(String value) { + for (WhatsAppMetaConversionType enumElement : WhatsAppMetaConversionType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppOutboundEventContent.java b/src/main/java/com/infobip/model/WhatsAppOutboundEventContent.java new file mode 100644 index 0000000..d3d48ba --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppOutboundEventContent.java @@ -0,0 +1,77 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Event content. + */ +public class WhatsAppOutboundEventContent { + + protected final WhatsAppOutboundEventContentType type; + + /** + * Constructs a new {@link WhatsAppOutboundEventContent} instance. + */ + public WhatsAppOutboundEventContent(String type) { + this.type = WhatsAppOutboundEventContentType.fromValue(type); + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public WhatsAppOutboundEventContentType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppOutboundEventContent whatsAppOutboundEventContent = (WhatsAppOutboundEventContent) o; + return Objects.equals(this.type, whatsAppOutboundEventContent.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppOutboundEventContent {") + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppOutboundEventContentType.java b/src/main/java/com/infobip/model/WhatsAppOutboundEventContentType.java new file mode 100644 index 0000000..a50652a --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppOutboundEventContentType.java @@ -0,0 +1,46 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Represents WhatsAppOutboundEventContentType enumeration. + */ +public enum WhatsAppOutboundEventContentType { + TYPING_INDICATOR("TYPING_INDICATOR"); + + private final String value; + + WhatsAppOutboundEventContentType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WhatsAppOutboundEventContentType fromValue(String value) { + for (WhatsAppOutboundEventContentType enumElement : WhatsAppOutboundEventContentType.values()) { + if (enumElement.value.equals(value)) { + return enumElement; + } + } + throw new IllegalArgumentException("Unexpected enum value '" + value + "'."); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppOutboundEventTypingIndicatorContent.java b/src/main/java/com/infobip/model/WhatsAppOutboundEventTypingIndicatorContent.java new file mode 100644 index 0000000..ffc12bf --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppOutboundEventTypingIndicatorContent.java @@ -0,0 +1,138 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents WhatsAppOutboundEventTypingIndicatorContent model. + */ +public class WhatsAppOutboundEventTypingIndicatorContent { + + private String messageId; + + private WhatsAppOutboundEventContentType type; + + /** + * Sets messageId. + *

+ * Field description: + * ID of the message to be marked as read. This field is deprecated and will be autofilled by the system. Any values supplied by the user will be ignored. + * + * @param messageId + * @return This {@link WhatsAppOutboundEventTypingIndicatorContent instance}. + */ + public WhatsAppOutboundEventTypingIndicatorContent messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Returns messageId. + *

+ * Field description: + * ID of the message to be marked as read. This field is deprecated and will be autofilled by the system. Any values supplied by the user will be ignored. + * + * @return messageId + */ + @JsonProperty("messageId") + public String getMessageId() { + return messageId; + } + + /** + * Sets messageId. + *

+ * Field description: + * ID of the message to be marked as read. This field is deprecated and will be autofilled by the system. Any values supplied by the user will be ignored. + * + * @param messageId + */ + @JsonProperty("messageId") + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + /** + * Sets type. + * + * @param type + * @return This {@link WhatsAppOutboundEventTypingIndicatorContent instance}. + */ + public WhatsAppOutboundEventTypingIndicatorContent type(WhatsAppOutboundEventContentType type) { + this.type = type; + return this; + } + + /** + * Returns type. + * + * @return type + */ + @JsonProperty("type") + public WhatsAppOutboundEventContentType getType() { + return type; + } + + /** + * Sets type. + * + * @param type + */ + @JsonProperty("type") + public void setType(WhatsAppOutboundEventContentType type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppOutboundEventTypingIndicatorContent whatsAppOutboundEventTypingIndicatorContent = + (WhatsAppOutboundEventTypingIndicatorContent) o; + return Objects.equals(this.messageId, whatsAppOutboundEventTypingIndicatorContent.messageId) + && Objects.equals(this.type, whatsAppOutboundEventTypingIndicatorContent.type); + } + + @Override + public int hashCode() { + return Objects.hash(messageId, type); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppOutboundEventTypingIndicatorContent {") + .append(newLine) + .append(" messageId: ") + .append(toIndentedString(messageId)) + .append(newLine) + .append(" type: ") + .append(toIndentedString(type)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppPayment.java b/src/main/java/com/infobip/model/WhatsAppPayment.java index c8b3d9f..bb97de9 100644 --- a/src/main/java/com/infobip/model/WhatsAppPayment.java +++ b/src/main/java/com/infobip/model/WhatsAppPayment.java @@ -86,6 +86,8 @@ public void setReferenceId(String referenceId) { *

* Field description: * Unique identifier of the payment. + *

+ * The field is required. * * @param paymentId * @return This {@link WhatsAppPayment instance}. @@ -100,6 +102,8 @@ public WhatsAppPayment paymentId(String paymentId) { *

* Field description: * Unique identifier of the payment. + *

+ * The field is required. * * @return paymentId */ @@ -113,6 +117,8 @@ public String getPaymentId() { *

* Field description: * Unique identifier of the payment. + *

+ * The field is required. * * @param paymentId */ diff --git a/src/main/java/com/infobip/model/WhatsAppQuickReplyCardActionButton.java b/src/main/java/com/infobip/model/WhatsAppQuickReplyCardActionButton.java new file mode 100644 index 0000000..7880cfe --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppQuickReplyCardActionButton.java @@ -0,0 +1,158 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Array of card action buttons. + */ +public class WhatsAppQuickReplyCardActionButton { + + private String id; + + private String title; + + /** + * Sets id. + *

+ * Field description: + * Id of the quick reply button. + *

+ * The field is required. + * + * @param id + * @return This {@link WhatsAppQuickReplyCardActionButton instance}. + */ + public WhatsAppQuickReplyCardActionButton id(String id) { + this.id = id; + return this; + } + + /** + * Returns id. + *

+ * Field description: + * Id of the quick reply button. + *

+ * The field is required. + * + * @return id + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * Sets id. + *

+ * Field description: + * Id of the quick reply button. + *

+ * The field is required. + * + * @param id + */ + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + /** + * Sets title. + *

+ * Field description: + * Display text of the quick reply button. + *

+ * The field is required. + * + * @param title + * @return This {@link WhatsAppQuickReplyCardActionButton instance}. + */ + public WhatsAppQuickReplyCardActionButton title(String title) { + this.title = title; + return this; + } + + /** + * Returns title. + *

+ * Field description: + * Display text of the quick reply button. + *

+ * The field is required. + * + * @return title + */ + @JsonProperty("title") + public String getTitle() { + return title; + } + + /** + * Sets title. + *

+ * Field description: + * Display text of the quick reply button. + *

+ * The field is required. + * + * @param title + */ + @JsonProperty("title") + public void setTitle(String title) { + this.title = title; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppQuickReplyCardActionButton whatsAppQuickReplyCardActionButton = (WhatsAppQuickReplyCardActionButton) o; + return Objects.equals(this.id, whatsAppQuickReplyCardActionButton.id) + && Objects.equals(this.title, whatsAppQuickReplyCardActionButton.title); + } + + @Override + public int hashCode() { + return Objects.hash(id, title); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppQuickReplyCardActionButton {") + .append(newLine) + .append(" id: ") + .append(toIndentedString(id)) + .append(newLine) + .append(" title: ") + .append(toIndentedString(title)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppQuickReplyMediaCarouselAction.java b/src/main/java/com/infobip/model/WhatsAppQuickReplyMediaCarouselAction.java new file mode 100644 index 0000000..a2db743 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppQuickReplyMediaCarouselAction.java @@ -0,0 +1,138 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents WhatsAppQuickReplyMediaCarouselAction model. + */ +public class WhatsAppQuickReplyMediaCarouselAction extends WhatsAppInteractiveMediaCarouselAction { + + private List cards = new ArrayList<>(); + + /** + * Constructs a new {@link WhatsAppQuickReplyMediaCarouselAction} instance. + */ + public WhatsAppQuickReplyMediaCarouselAction() { + super("QUICK_REPLY"); + } + + /** + * Sets cards. + *

+ * Field description: + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + *

+ * The field is required. + * + * @param cards + * @return This {@link WhatsAppQuickReplyMediaCarouselAction instance}. + */ + public WhatsAppQuickReplyMediaCarouselAction cards(List cards) { + this.cards = cards; + return this; + } + + /** + * Adds and item into cards. + *

+ * Field description: + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + *

+ * The field is required. + * + * @param cardsItem The item to be added to the list. + * @return This {@link WhatsAppQuickReplyMediaCarouselAction instance}. + */ + public WhatsAppQuickReplyMediaCarouselAction addCardsItem(WhatsAppQuickReplyMediaCarouselCard cardsItem) { + if (this.cards == null) { + this.cards = new ArrayList<>(); + } + this.cards.add(cardsItem); + return this; + } + + /** + * Returns cards. + *

+ * Field description: + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + *

+ * The field is required. + * + * @return cards + */ + @JsonProperty("cards") + public List getCards() { + return cards; + } + + /** + * Sets cards. + *

+ * Field description: + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + *

+ * The field is required. + * + * @param cards + */ + @JsonProperty("cards") + public void setCards(List cards) { + this.cards = cards; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppQuickReplyMediaCarouselAction whatsAppQuickReplyMediaCarouselAction = + (WhatsAppQuickReplyMediaCarouselAction) o; + return Objects.equals(this.cards, whatsAppQuickReplyMediaCarouselAction.cards) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(cards, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppQuickReplyMediaCarouselAction {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" cards: ") + .append(toIndentedString(cards)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppQuickReplyMediaCarouselCard.java b/src/main/java/com/infobip/model/WhatsAppQuickReplyMediaCarouselCard.java new file mode 100644 index 0000000..bc467ba --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppQuickReplyMediaCarouselCard.java @@ -0,0 +1,214 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + */ +public class WhatsAppQuickReplyMediaCarouselCard { + + private WhatsAppMediaCarouselCardHeader header; + + private WhatsAppMediaCarouselCardBody body; + + private List buttons = new ArrayList<>(); + + /** + * Sets header. + *

+ * The field is required. + * + * @param header + * @return This {@link WhatsAppQuickReplyMediaCarouselCard instance}. + */ + public WhatsAppQuickReplyMediaCarouselCard header(WhatsAppMediaCarouselCardHeader header) { + this.header = header; + return this; + } + + /** + * Returns header. + *

+ * The field is required. + * + * @return header + */ + @JsonProperty("header") + public WhatsAppMediaCarouselCardHeader getHeader() { + return header; + } + + /** + * Sets header. + *

+ * The field is required. + * + * @param header + */ + @JsonProperty("header") + public void setHeader(WhatsAppMediaCarouselCardHeader header) { + this.header = header; + } + + /** + * Sets body. + *

+ * The field is required. + * + * @param body + * @return This {@link WhatsAppQuickReplyMediaCarouselCard instance}. + */ + public WhatsAppQuickReplyMediaCarouselCard body(WhatsAppMediaCarouselCardBody body) { + this.body = body; + return this; + } + + /** + * Returns body. + *

+ * The field is required. + * + * @return body + */ + @JsonProperty("body") + public WhatsAppMediaCarouselCardBody getBody() { + return body; + } + + /** + * Sets body. + *

+ * The field is required. + * + * @param body + */ + @JsonProperty("body") + public void setBody(WhatsAppMediaCarouselCardBody body) { + this.body = body; + } + + /** + * Sets buttons. + *

+ * Field description: + * Array of card action buttons. + *

+ * The field is required. + * + * @param buttons + * @return This {@link WhatsAppQuickReplyMediaCarouselCard instance}. + */ + public WhatsAppQuickReplyMediaCarouselCard buttons(List buttons) { + this.buttons = buttons; + return this; + } + + /** + * Adds and item into buttons. + *

+ * Field description: + * Array of card action buttons. + *

+ * The field is required. + * + * @param buttonsItem The item to be added to the list. + * @return This {@link WhatsAppQuickReplyMediaCarouselCard instance}. + */ + public WhatsAppQuickReplyMediaCarouselCard addButtonsItem(WhatsAppQuickReplyCardActionButton buttonsItem) { + if (this.buttons == null) { + this.buttons = new ArrayList<>(); + } + this.buttons.add(buttonsItem); + return this; + } + + /** + * Returns buttons. + *

+ * Field description: + * Array of card action buttons. + *

+ * The field is required. + * + * @return buttons + */ + @JsonProperty("buttons") + public List getButtons() { + return buttons; + } + + /** + * Sets buttons. + *

+ * Field description: + * Array of card action buttons. + *

+ * The field is required. + * + * @param buttons + */ + @JsonProperty("buttons") + public void setButtons(List buttons) { + this.buttons = buttons; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppQuickReplyMediaCarouselCard whatsAppQuickReplyMediaCarouselCard = + (WhatsAppQuickReplyMediaCarouselCard) o; + return Objects.equals(this.header, whatsAppQuickReplyMediaCarouselCard.header) + && Objects.equals(this.body, whatsAppQuickReplyMediaCarouselCard.body) + && Objects.equals(this.buttons, whatsAppQuickReplyMediaCarouselCard.buttons); + } + + @Override + public int hashCode() { + return Objects.hash(header, body, buttons); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppQuickReplyMediaCarouselCard {") + .append(newLine) + .append(" header: ") + .append(toIndentedString(header)) + .append(newLine) + .append(" body: ") + .append(toIndentedString(body)) + .append(newLine) + .append(" buttons: ") + .append(toIndentedString(buttons)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppRequestSchedulingSettings.java b/src/main/java/com/infobip/model/WhatsAppRequestSchedulingSettings.java new file mode 100644 index 0000000..b018c33 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppRequestSchedulingSettings.java @@ -0,0 +1,184 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Options for scheduling a message. + */ +public class WhatsAppRequestSchedulingSettings { + + private String bulkId; + + private OffsetDateTime sendAt; + + private SendingSpeedLimit sendingSpeedLimit; + + /** + * Sets bulkId. + *

+ * Field description: + * Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. + * + * @param bulkId + * @return This {@link WhatsAppRequestSchedulingSettings instance}. + */ + public WhatsAppRequestSchedulingSettings bulkId(String bulkId) { + this.bulkId = bulkId; + return this; + } + + /** + * Returns bulkId. + *

+ * Field description: + * Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. + * + * @return bulkId + */ + @JsonProperty("bulkId") + public String getBulkId() { + return bulkId; + } + + /** + * Sets bulkId. + *

+ * Field description: + * Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. + * + * @param bulkId + */ + @JsonProperty("bulkId") + public void setBulkId(String bulkId) { + this.bulkId = bulkId; + } + + /** + * Sets sendAt. + *

+ * Field description: + * Date and time when the message is to be sent. Used for scheduled messages. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, and can only be scheduled for no later than 180 days in advance. + * + * @param sendAt + * @return This {@link WhatsAppRequestSchedulingSettings instance}. + */ + public WhatsAppRequestSchedulingSettings sendAt(OffsetDateTime sendAt) { + this.sendAt = sendAt; + return this; + } + + /** + * Returns sendAt. + *

+ * Field description: + * Date and time when the message is to be sent. Used for scheduled messages. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, and can only be scheduled for no later than 180 days in advance. + * + * @return sendAt + */ + @JsonProperty("sendAt") + public OffsetDateTime getSendAt() { + return sendAt; + } + + /** + * Sets sendAt. + *

+ * Field description: + * Date and time when the message is to be sent. Used for scheduled messages. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, and can only be scheduled for no later than 180 days in advance. + * + * @param sendAt + */ + @JsonProperty("sendAt") + public void setSendAt(OffsetDateTime sendAt) { + this.sendAt = sendAt; + } + + /** + * Sets sendingSpeedLimit. + * + * @param sendingSpeedLimit + * @return This {@link WhatsAppRequestSchedulingSettings instance}. + */ + public WhatsAppRequestSchedulingSettings sendingSpeedLimit(SendingSpeedLimit sendingSpeedLimit) { + this.sendingSpeedLimit = sendingSpeedLimit; + return this; + } + + /** + * Returns sendingSpeedLimit. + * + * @return sendingSpeedLimit + */ + @JsonProperty("sendingSpeedLimit") + public SendingSpeedLimit getSendingSpeedLimit() { + return sendingSpeedLimit; + } + + /** + * Sets sendingSpeedLimit. + * + * @param sendingSpeedLimit + */ + @JsonProperty("sendingSpeedLimit") + public void setSendingSpeedLimit(SendingSpeedLimit sendingSpeedLimit) { + this.sendingSpeedLimit = sendingSpeedLimit; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppRequestSchedulingSettings whatsAppRequestSchedulingSettings = (WhatsAppRequestSchedulingSettings) o; + return Objects.equals(this.bulkId, whatsAppRequestSchedulingSettings.bulkId) + && Objects.equals(this.sendAt, whatsAppRequestSchedulingSettings.sendAt) + && Objects.equals(this.sendingSpeedLimit, whatsAppRequestSchedulingSettings.sendingSpeedLimit); + } + + @Override + public int hashCode() { + return Objects.hash(bulkId, sendAt, sendingSpeedLimit); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppRequestSchedulingSettings {") + .append(newLine) + .append(" bulkId: ") + .append(toIndentedString(bulkId)) + .append(newLine) + .append(" sendAt: ") + .append(toIndentedString(sendAt)) + .append(newLine) + .append(" sendingSpeedLimit: ") + .append(toIndentedString(sendingSpeedLimit)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails.java b/src/main/java/com/infobip/model/WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails.java new file mode 100644 index 0000000..64cd0af --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails.java @@ -0,0 +1,178 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails model. + */ +public class WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails { + + private String bulkId; + + private List messages = new ArrayList<>(); + + /** + * Sets bulkId. + *

+ * Field description: + * Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. Typically used for fetching delivery reports and message logs. + * + * @param bulkId + * @return This {@link WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails instance}. + */ + public WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails bulkId(String bulkId) { + this.bulkId = bulkId; + return this; + } + + /** + * Returns bulkId. + *

+ * Field description: + * Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. Typically used for fetching delivery reports and message logs. + * + * @return bulkId + */ + @JsonProperty("bulkId") + public String getBulkId() { + return bulkId; + } + + /** + * Sets bulkId. + *

+ * Field description: + * Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. Typically used for fetching delivery reports and message logs. + * + * @param bulkId + */ + @JsonProperty("bulkId") + public void setBulkId(String bulkId) { + this.bulkId = bulkId; + } + + /** + * Sets messages. + *

+ * Field description: + * An array of message objects of a single message or multiple messages sent under one bulk ID. + *

+ * The field is required. + * + * @param messages + * @return This {@link WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails instance}. + */ + public WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails messages( + List messages) { + this.messages = messages; + return this; + } + + /** + * Adds and item into messages. + *

+ * Field description: + * An array of message objects of a single message or multiple messages sent under one bulk ID. + *

+ * The field is required. + * + * @param messagesItem The item to be added to the list. + * @return This {@link WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails instance}. + */ + public WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails addMessagesItem( + WhatsAppMessageResponseMessageResponseDetails messagesItem) { + if (this.messages == null) { + this.messages = new ArrayList<>(); + } + this.messages.add(messagesItem); + return this; + } + + /** + * Returns messages. + *

+ * Field description: + * An array of message objects of a single message or multiple messages sent under one bulk ID. + *

+ * The field is required. + * + * @return messages + */ + @JsonProperty("messages") + public List getMessages() { + return messages; + } + + /** + * Sets messages. + *

+ * Field description: + * An array of message objects of a single message or multiple messages sent under one bulk ID. + *

+ * The field is required. + * + * @param messages + */ + @JsonProperty("messages") + public void setMessages(List messages) { + this.messages = messages; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails + whatsAppResponseEnvelopeMessageResponseMessageResponseDetails = + (WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails) o; + return Objects.equals(this.bulkId, whatsAppResponseEnvelopeMessageResponseMessageResponseDetails.bulkId) + && Objects.equals( + this.messages, whatsAppResponseEnvelopeMessageResponseMessageResponseDetails.messages); + } + + @Override + public int hashCode() { + return Objects.hash(bulkId, messages); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppResponseEnvelopeMessageResponseMessageResponseDetails {") + .append(newLine) + .append(" bulkId: ") + .append(toIndentedString(bulkId)) + .append(newLine) + .append(" messages: ") + .append(toIndentedString(messages)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppSenderPublicKeyResponse.java b/src/main/java/com/infobip/model/WhatsAppSenderPublicKeyResponse.java new file mode 100644 index 0000000..0221f7f --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppSenderPublicKeyResponse.java @@ -0,0 +1,159 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * WhatsApp sender public key information + */ +public class WhatsAppSenderPublicKeyResponse { + + private String publicKey; + + private String publicKeySignatureStatus; + + /** + * Sets publicKey. + *

+ * Field description: + * PEM-formatted customer public key + *

+ * The field is required. + * + * @param publicKey + * @return This {@link WhatsAppSenderPublicKeyResponse instance}. + */ + public WhatsAppSenderPublicKeyResponse publicKey(String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * Returns publicKey. + *

+ * Field description: + * PEM-formatted customer public key + *

+ * The field is required. + * + * @return publicKey + */ + @JsonProperty("publicKey") + public String getPublicKey() { + return publicKey; + } + + /** + * Sets publicKey. + *

+ * Field description: + * PEM-formatted customer public key + *

+ * The field is required. + * + * @param publicKey + */ + @JsonProperty("publicKey") + public void setPublicKey(String publicKey) { + this.publicKey = publicKey; + } + + /** + * Sets publicKeySignatureStatus. + *

+ * Field description: + * Status of the customer public key signature + *

+ * The field is required. + * + * @param publicKeySignatureStatus + * @return This {@link WhatsAppSenderPublicKeyResponse instance}. + */ + public WhatsAppSenderPublicKeyResponse publicKeySignatureStatus(String publicKeySignatureStatus) { + this.publicKeySignatureStatus = publicKeySignatureStatus; + return this; + } + + /** + * Returns publicKeySignatureStatus. + *

+ * Field description: + * Status of the customer public key signature + *

+ * The field is required. + * + * @return publicKeySignatureStatus + */ + @JsonProperty("publicKeySignatureStatus") + public String getPublicKeySignatureStatus() { + return publicKeySignatureStatus; + } + + /** + * Sets publicKeySignatureStatus. + *

+ * Field description: + * Status of the customer public key signature + *

+ * The field is required. + * + * @param publicKeySignatureStatus + */ + @JsonProperty("publicKeySignatureStatus") + public void setPublicKeySignatureStatus(String publicKeySignatureStatus) { + this.publicKeySignatureStatus = publicKeySignatureStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppSenderPublicKeyResponse whatsAppSenderPublicKeyResponse = (WhatsAppSenderPublicKeyResponse) o; + return Objects.equals(this.publicKey, whatsAppSenderPublicKeyResponse.publicKey) + && Objects.equals( + this.publicKeySignatureStatus, whatsAppSenderPublicKeyResponse.publicKeySignatureStatus); + } + + @Override + public int hashCode() { + return Objects.hash(publicKey, publicKeySignatureStatus); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppSenderPublicKeyResponse {") + .append(newLine) + .append(" publicKey: ") + .append(toIndentedString(publicKey)) + .append(newLine) + .append(" publicKeySignatureStatus: ") + .append(toIndentedString(publicKeySignatureStatus)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppShareWabaRequest.java b/src/main/java/com/infobip/model/WhatsAppShareWabaRequest.java new file mode 100644 index 0000000..ba008c7 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppShareWabaRequest.java @@ -0,0 +1,97 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents WhatsAppShareWabaRequest model. + */ +public class WhatsAppShareWabaRequest { + + private Long businessAccountId; + + /** + * Sets businessAccountId. + *

+ * The field is required. + * + * @param businessAccountId + * @return This {@link WhatsAppShareWabaRequest instance}. + */ + public WhatsAppShareWabaRequest businessAccountId(Long businessAccountId) { + this.businessAccountId = businessAccountId; + return this; + } + + /** + * Returns businessAccountId. + *

+ * The field is required. + * + * @return businessAccountId + */ + @JsonProperty("businessAccountId") + public Long getBusinessAccountId() { + return businessAccountId; + } + + /** + * Sets businessAccountId. + *

+ * The field is required. + * + * @param businessAccountId + */ + @JsonProperty("businessAccountId") + public void setBusinessAccountId(Long businessAccountId) { + this.businessAccountId = businessAccountId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppShareWabaRequest whatsAppShareWabaRequest = (WhatsAppShareWabaRequest) o; + return Objects.equals(this.businessAccountId, whatsAppShareWabaRequest.businessAccountId); + } + + @Override + public int hashCode() { + return Objects.hash(businessAccountId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppShareWabaRequest {") + .append(newLine) + .append(" businessAccountId: ") + .append(toIndentedString(businessAccountId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppTemplateApiResponse.java b/src/main/java/com/infobip/model/WhatsAppTemplateApiResponse.java index ca71cf2..e4d1f7e 100644 --- a/src/main/java/com/infobip/model/WhatsAppTemplateApiResponse.java +++ b/src/main/java/com/infobip/model/WhatsAppTemplateApiResponse.java @@ -97,6 +97,8 @@ public static QualityEnum fromValue(String value) { private OffsetDateTime lastUpdatedAt; + private String libraryTemplateName; + /** * Sets id. *

@@ -477,6 +479,46 @@ public void setLastUpdatedAt(OffsetDateTime lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; } + /** + * Sets libraryTemplateName. + *

+ * Field description: + * Name of the library template from which this template was created. If not present, the template was not created using the template library. + * + * @param libraryTemplateName + * @return This {@link WhatsAppTemplateApiResponse instance}. + */ + public WhatsAppTemplateApiResponse libraryTemplateName(String libraryTemplateName) { + this.libraryTemplateName = libraryTemplateName; + return this; + } + + /** + * Returns libraryTemplateName. + *

+ * Field description: + * Name of the library template from which this template was created. If not present, the template was not created using the template library. + * + * @return libraryTemplateName + */ + @JsonProperty("libraryTemplateName") + public String getLibraryTemplateName() { + return libraryTemplateName; + } + + /** + * Sets libraryTemplateName. + *

+ * Field description: + * Name of the library template from which this template was created. If not present, the template was not created using the template library. + * + * @param libraryTemplateName + */ + @JsonProperty("libraryTemplateName") + public void setLibraryTemplateName(String libraryTemplateName) { + this.libraryTemplateName = libraryTemplateName; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -496,7 +538,8 @@ public boolean equals(Object o) { && Objects.equals(this.quality, whatsAppTemplateApiResponse.quality) && Objects.equals(this.platform, whatsAppTemplateApiResponse.platform) && Objects.equals(this.createdAt, whatsAppTemplateApiResponse.createdAt) - && Objects.equals(this.lastUpdatedAt, whatsAppTemplateApiResponse.lastUpdatedAt); + && Objects.equals(this.lastUpdatedAt, whatsAppTemplateApiResponse.lastUpdatedAt) + && Objects.equals(this.libraryTemplateName, whatsAppTemplateApiResponse.libraryTemplateName); } @Override @@ -512,7 +555,8 @@ public int hashCode() { quality, platform, createdAt, - lastUpdatedAt); + lastUpdatedAt, + libraryTemplateName); } @Override @@ -554,6 +598,9 @@ public String toString() { .append(" lastUpdatedAt: ") .append(toIndentedString(lastUpdatedAt)) .append(newLine) + .append(" libraryTemplateName: ") + .append(toIndentedString(libraryTemplateName)) + .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/WhatsAppTemplateButtonContent.java b/src/main/java/com/infobip/model/WhatsAppTemplateButtonContent.java index e57e065..93e2e09 100644 --- a/src/main/java/com/infobip/model/WhatsAppTemplateButtonContent.java +++ b/src/main/java/com/infobip/model/WhatsAppTemplateButtonContent.java @@ -30,6 +30,7 @@ @JsonSubTypes.Type(value = WhatsAppTemplateOrderDetailsButtonContent.class, name = "ORDER_DETAILS"), @JsonSubTypes.Type(value = WhatsAppTemplateQuickReplyButtonContent.class, name = "QUICK_REPLY"), @JsonSubTypes.Type(value = WhatsAppTemplateUrlButtonContent.class, name = "URL"), + @JsonSubTypes.Type(value = WhatsAppTemplateVoiceCallButtonContent.class, name = "VOICE_CALL"), }) public abstract class WhatsAppTemplateButtonContent { diff --git a/src/main/java/com/infobip/model/WhatsAppTemplateVoiceCallButtonContent.java b/src/main/java/com/infobip/model/WhatsAppTemplateVoiceCallButtonContent.java new file mode 100644 index 0000000..1d747ac --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppTemplateVoiceCallButtonContent.java @@ -0,0 +1,158 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents WhatsAppTemplateVoiceCallButtonContent model. + */ +public class WhatsAppTemplateVoiceCallButtonContent extends WhatsAppTemplateButtonContent { + + private Integer callValidityPeriod; + + private String callContextPayload; + + /** + * Constructs a new {@link WhatsAppTemplateVoiceCallButtonContent} instance. + */ + public WhatsAppTemplateVoiceCallButtonContent() { + super("VOICE_CALL"); + } + + /** + * Sets callValidityPeriod. + *

+ * Field description: + * Time to live for the voice call button in minutes. Must be between 1 and 43200 (30 days). Default value is 10080 (7 days). + * + * @param callValidityPeriod + * @return This {@link WhatsAppTemplateVoiceCallButtonContent instance}. + */ + public WhatsAppTemplateVoiceCallButtonContent callValidityPeriod(Integer callValidityPeriod) { + this.callValidityPeriod = callValidityPeriod; + return this; + } + + /** + * Returns callValidityPeriod. + *

+ * Field description: + * Time to live for the voice call button in minutes. Must be between 1 and 43200 (30 days). Default value is 10080 (7 days). + * + * @return callValidityPeriod + */ + @JsonProperty("callValidityPeriod") + public Integer getCallValidityPeriod() { + return callValidityPeriod; + } + + /** + * Sets callValidityPeriod. + *

+ * Field description: + * Time to live for the voice call button in minutes. Must be between 1 and 43200 (30 days). Default value is 10080 (7 days). + * + * @param callValidityPeriod + */ + @JsonProperty("callValidityPeriod") + public void setCallValidityPeriod(Integer callValidityPeriod) { + this.callValidityPeriod = callValidityPeriod; + } + + /** + * Sets callContextPayload. + *

+ * Field description: + * Payload data sent with the button. Can be retrieved from the call webhook. + * + * @param callContextPayload + * @return This {@link WhatsAppTemplateVoiceCallButtonContent instance}. + */ + public WhatsAppTemplateVoiceCallButtonContent callContextPayload(String callContextPayload) { + this.callContextPayload = callContextPayload; + return this; + } + + /** + * Returns callContextPayload. + *

+ * Field description: + * Payload data sent with the button. Can be retrieved from the call webhook. + * + * @return callContextPayload + */ + @JsonProperty("callContextPayload") + public String getCallContextPayload() { + return callContextPayload; + } + + /** + * Sets callContextPayload. + *

+ * Field description: + * Payload data sent with the button. Can be retrieved from the call webhook. + * + * @param callContextPayload + */ + @JsonProperty("callContextPayload") + public void setCallContextPayload(String callContextPayload) { + this.callContextPayload = callContextPayload; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppTemplateVoiceCallButtonContent whatsAppTemplateVoiceCallButtonContent = + (WhatsAppTemplateVoiceCallButtonContent) o; + return Objects.equals(this.callValidityPeriod, whatsAppTemplateVoiceCallButtonContent.callValidityPeriod) + && Objects.equals(this.callContextPayload, whatsAppTemplateVoiceCallButtonContent.callContextPayload) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(callValidityPeriod, callContextPayload, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppTemplateVoiceCallButtonContent {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" callValidityPeriod: ") + .append(toIndentedString(callValidityPeriod)) + .append(newLine) + .append(" callContextPayload: ") + .append(toIndentedString(callContextPayload)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppToDestination.java b/src/main/java/com/infobip/model/WhatsAppToDestination.java new file mode 100644 index 0000000..3f2491e --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppToDestination.java @@ -0,0 +1,152 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * An array of destination objects for where messages are being sent. A valid destination is required. + */ +public class WhatsAppToDestination { + + private String to; + + private String messageId; + + /** + * Sets to. + *

+ * Field description: + * The destination address of the message. + *

+ * The field is required. + * + * @param to + * @return This {@link WhatsAppToDestination instance}. + */ + public WhatsAppToDestination to(String to) { + this.to = to; + return this; + } + + /** + * Returns to. + *

+ * Field description: + * The destination address of the message. + *

+ * The field is required. + * + * @return to + */ + @JsonProperty("to") + public String getTo() { + return to; + } + + /** + * Sets to. + *

+ * Field description: + * The destination address of the message. + *

+ * The field is required. + * + * @param to + */ + @JsonProperty("to") + public void setTo(String to) { + this.to = to; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @param messageId + * @return This {@link WhatsAppToDestination instance}. + */ + public WhatsAppToDestination messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Returns messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @return messageId + */ + @JsonProperty("messageId") + public String getMessageId() { + return messageId; + } + + /** + * Sets messageId. + *

+ * Field description: + * The ID that uniquely identifies the message sent. + * + * @param messageId + */ + @JsonProperty("messageId") + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppToDestination whatsAppToDestination = (WhatsAppToDestination) o; + return Objects.equals(this.to, whatsAppToDestination.to) + && Objects.equals(this.messageId, whatsAppToDestination.messageId); + } + + @Override + public int hashCode() { + return Objects.hash(to, messageId); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppToDestination {") + .append(newLine) + .append(" to: ") + .append(toIndentedString(to)) + .append(newLine) + .append(" messageId: ") + .append(toIndentedString(messageId)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppUrlCardActionButton.java b/src/main/java/com/infobip/model/WhatsAppUrlCardActionButton.java new file mode 100644 index 0000000..d3d69c5 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppUrlCardActionButton.java @@ -0,0 +1,158 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Url button. + */ +public class WhatsAppUrlCardActionButton { + + private String displayText; + + private String url; + + /** + * Sets displayText. + *

+ * Field description: + * Display text of the URL button. + *

+ * The field is required. + * + * @param displayText + * @return This {@link WhatsAppUrlCardActionButton instance}. + */ + public WhatsAppUrlCardActionButton displayText(String displayText) { + this.displayText = displayText; + return this; + } + + /** + * Returns displayText. + *

+ * Field description: + * Display text of the URL button. + *

+ * The field is required. + * + * @return displayText + */ + @JsonProperty("displayText") + public String getDisplayText() { + return displayText; + } + + /** + * Sets displayText. + *

+ * Field description: + * Display text of the URL button. + *

+ * The field is required. + * + * @param displayText + */ + @JsonProperty("displayText") + public void setDisplayText(String displayText) { + this.displayText = displayText; + } + + /** + * Sets url. + *

+ * Field description: + * URL text of the URL button. + *

+ * The field is required. + * + * @param url + * @return This {@link WhatsAppUrlCardActionButton instance}. + */ + public WhatsAppUrlCardActionButton url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * URL text of the URL button. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * URL text of the URL button. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppUrlCardActionButton whatsAppUrlCardActionButton = (WhatsAppUrlCardActionButton) o; + return Objects.equals(this.displayText, whatsAppUrlCardActionButton.displayText) + && Objects.equals(this.url, whatsAppUrlCardActionButton.url); + } + + @Override + public int hashCode() { + return Objects.hash(displayText, url); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppUrlCardActionButton {") + .append(newLine) + .append(" displayText: ") + .append(toIndentedString(displayText)) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppUrlMediaCarouselAction.java b/src/main/java/com/infobip/model/WhatsAppUrlMediaCarouselAction.java new file mode 100644 index 0000000..53700c3 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppUrlMediaCarouselAction.java @@ -0,0 +1,137 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents WhatsAppUrlMediaCarouselAction model. + */ +public class WhatsAppUrlMediaCarouselAction extends WhatsAppInteractiveMediaCarouselAction { + + private List cards = new ArrayList<>(); + + /** + * Constructs a new {@link WhatsAppUrlMediaCarouselAction} instance. + */ + public WhatsAppUrlMediaCarouselAction() { + super("URL"); + } + + /** + * Sets cards. + *

+ * Field description: + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + *

+ * The field is required. + * + * @param cards + * @return This {@link WhatsAppUrlMediaCarouselAction instance}. + */ + public WhatsAppUrlMediaCarouselAction cards(List cards) { + this.cards = cards; + return this; + } + + /** + * Adds and item into cards. + *

+ * Field description: + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + *

+ * The field is required. + * + * @param cardsItem The item to be added to the list. + * @return This {@link WhatsAppUrlMediaCarouselAction instance}. + */ + public WhatsAppUrlMediaCarouselAction addCardsItem(WhatsAppUrlMediaCarouselCard cardsItem) { + if (this.cards == null) { + this.cards = new ArrayList<>(); + } + this.cards.add(cardsItem); + return this; + } + + /** + * Returns cards. + *

+ * Field description: + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + *

+ * The field is required. + * + * @return cards + */ + @JsonProperty("cards") + public List getCards() { + return cards; + } + + /** + * Sets cards. + *

+ * Field description: + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + *

+ * The field is required. + * + * @param cards + */ + @JsonProperty("cards") + public void setCards(List cards) { + this.cards = cards; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppUrlMediaCarouselAction whatsAppUrlMediaCarouselAction = (WhatsAppUrlMediaCarouselAction) o; + return Objects.equals(this.cards, whatsAppUrlMediaCarouselAction.cards) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(cards, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppUrlMediaCarouselAction {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" cards: ") + .append(toIndentedString(cards)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppUrlMediaCarouselCard.java b/src/main/java/com/infobip/model/WhatsAppUrlMediaCarouselCard.java new file mode 100644 index 0000000..40da943 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppUrlMediaCarouselCard.java @@ -0,0 +1,183 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Carousel cards. Should be defined in the correct order.It can have between two and ten cards. + */ +public class WhatsAppUrlMediaCarouselCard { + + private WhatsAppMediaCarouselCardHeader header; + + private WhatsAppMediaCarouselCardBody body; + + private WhatsAppUrlCardActionButton button; + + /** + * Sets header. + *

+ * The field is required. + * + * @param header + * @return This {@link WhatsAppUrlMediaCarouselCard instance}. + */ + public WhatsAppUrlMediaCarouselCard header(WhatsAppMediaCarouselCardHeader header) { + this.header = header; + return this; + } + + /** + * Returns header. + *

+ * The field is required. + * + * @return header + */ + @JsonProperty("header") + public WhatsAppMediaCarouselCardHeader getHeader() { + return header; + } + + /** + * Sets header. + *

+ * The field is required. + * + * @param header + */ + @JsonProperty("header") + public void setHeader(WhatsAppMediaCarouselCardHeader header) { + this.header = header; + } + + /** + * Sets body. + *

+ * The field is required. + * + * @param body + * @return This {@link WhatsAppUrlMediaCarouselCard instance}. + */ + public WhatsAppUrlMediaCarouselCard body(WhatsAppMediaCarouselCardBody body) { + this.body = body; + return this; + } + + /** + * Returns body. + *

+ * The field is required. + * + * @return body + */ + @JsonProperty("body") + public WhatsAppMediaCarouselCardBody getBody() { + return body; + } + + /** + * Sets body. + *

+ * The field is required. + * + * @param body + */ + @JsonProperty("body") + public void setBody(WhatsAppMediaCarouselCardBody body) { + this.body = body; + } + + /** + * Sets button. + *

+ * The field is required. + * + * @param button + * @return This {@link WhatsAppUrlMediaCarouselCard instance}. + */ + public WhatsAppUrlMediaCarouselCard button(WhatsAppUrlCardActionButton button) { + this.button = button; + return this; + } + + /** + * Returns button. + *

+ * The field is required. + * + * @return button + */ + @JsonProperty("button") + public WhatsAppUrlCardActionButton getButton() { + return button; + } + + /** + * Sets button. + *

+ * The field is required. + * + * @param button + */ + @JsonProperty("button") + public void setButton(WhatsAppUrlCardActionButton button) { + this.button = button; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppUrlMediaCarouselCard whatsAppUrlMediaCarouselCard = (WhatsAppUrlMediaCarouselCard) o; + return Objects.equals(this.header, whatsAppUrlMediaCarouselCard.header) + && Objects.equals(this.body, whatsAppUrlMediaCarouselCard.body) + && Objects.equals(this.button, whatsAppUrlMediaCarouselCard.button); + } + + @Override + public int hashCode() { + return Objects.hash(header, body, button); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppUrlMediaCarouselCard {") + .append(newLine) + .append(" header: ") + .append(toIndentedString(header)) + .append(newLine) + .append(" body: ") + .append(toIndentedString(body)) + .append(newLine) + .append(" button: ") + .append(toIndentedString(button)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppVideoMediaCarouselCardHeader.java b/src/main/java/com/infobip/model/WhatsAppVideoMediaCarouselCardHeader.java new file mode 100644 index 0000000..91693d8 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppVideoMediaCarouselCardHeader.java @@ -0,0 +1,117 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents WhatsAppVideoMediaCarouselCardHeader model. + */ +public class WhatsAppVideoMediaCarouselCardHeader extends WhatsAppMediaCarouselCardHeader { + + private String url; + + /** + * Constructs a new {@link WhatsAppVideoMediaCarouselCardHeader} instance. + */ + public WhatsAppVideoMediaCarouselCardHeader() { + super("VIDEO"); + } + + /** + * Sets url. + *

+ * Field description: + * URL of a video sent in the header. It is expected to be a valid URL starting with `https://` or `http://`. Supported video types are `MP4`, `3GPP`. Maximum video size is 16MB. + *

+ * The field is required. + * + * @param url + * @return This {@link WhatsAppVideoMediaCarouselCardHeader instance}. + */ + public WhatsAppVideoMediaCarouselCardHeader url(String url) { + this.url = url; + return this; + } + + /** + * Returns url. + *

+ * Field description: + * URL of a video sent in the header. It is expected to be a valid URL starting with `https://` or `http://`. Supported video types are `MP4`, `3GPP`. Maximum video size is 16MB. + *

+ * The field is required. + * + * @return url + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * Sets url. + *

+ * Field description: + * URL of a video sent in the header. It is expected to be a valid URL starting with `https://` or `http://`. Supported video types are `MP4`, `3GPP`. Maximum video size is 16MB. + *

+ * The field is required. + * + * @param url + */ + @JsonProperty("url") + public void setUrl(String url) { + this.url = url; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppVideoMediaCarouselCardHeader whatsAppVideoMediaCarouselCardHeader = + (WhatsAppVideoMediaCarouselCardHeader) o; + return Objects.equals(this.url, whatsAppVideoMediaCarouselCardHeader.url) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(url, super.hashCode()); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppVideoMediaCarouselCardHeader {") + .append(newLine) + .append(" ") + .append(toIndentedString(super.toString())) + .append(newLine) + .append(" url: ") + .append(toIndentedString(url)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppVoiceCallButtonApiData.java b/src/main/java/com/infobip/model/WhatsAppVoiceCallButtonApiData.java index bbe43e3..623278f 100644 --- a/src/main/java/com/infobip/model/WhatsAppVoiceCallButtonApiData.java +++ b/src/main/java/com/infobip/model/WhatsAppVoiceCallButtonApiData.java @@ -19,6 +19,8 @@ public class WhatsAppVoiceCallButtonApiData extends WhatsAppButtonApiData { private String text; + private Integer callValidityPeriod; + /** * Constructs a new {@link WhatsAppVoiceCallButtonApiData} instance. */ @@ -72,6 +74,46 @@ public void setText(String text) { this.text = text; } + /** + * Sets callValidityPeriod. + *

+ * Field description: + * Time to live for the call button in minutes. Must be between 1440 (1 day) and 43200 (30 days). + * + * @param callValidityPeriod + * @return This {@link WhatsAppVoiceCallButtonApiData instance}. + */ + public WhatsAppVoiceCallButtonApiData callValidityPeriod(Integer callValidityPeriod) { + this.callValidityPeriod = callValidityPeriod; + return this; + } + + /** + * Returns callValidityPeriod. + *

+ * Field description: + * Time to live for the call button in minutes. Must be between 1440 (1 day) and 43200 (30 days). + * + * @return callValidityPeriod + */ + @JsonProperty("callValidityPeriod") + public Integer getCallValidityPeriod() { + return callValidityPeriod; + } + + /** + * Sets callValidityPeriod. + *

+ * Field description: + * Time to live for the call button in minutes. Must be between 1440 (1 day) and 43200 (30 days). + * + * @param callValidityPeriod + */ + @JsonProperty("callValidityPeriod") + public void setCallValidityPeriod(Integer callValidityPeriod) { + this.callValidityPeriod = callValidityPeriod; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -81,12 +123,14 @@ public boolean equals(Object o) { return false; } WhatsAppVoiceCallButtonApiData whatsAppVoiceCallButtonApiData = (WhatsAppVoiceCallButtonApiData) o; - return Objects.equals(this.text, whatsAppVoiceCallButtonApiData.text) && super.equals(o); + return Objects.equals(this.text, whatsAppVoiceCallButtonApiData.text) + && Objects.equals(this.callValidityPeriod, whatsAppVoiceCallButtonApiData.callValidityPeriod) + && super.equals(o); } @Override public int hashCode() { - return Objects.hash(text, super.hashCode()); + return Objects.hash(text, callValidityPeriod, super.hashCode()); } @Override @@ -101,6 +145,9 @@ public String toString() { .append(" text: ") .append(toIndentedString(text)) .append(newLine) + .append(" callValidityPeriod: ") + .append(toIndentedString(callValidityPeriod)) + .append(newLine) .append("}") .toString(); } diff --git a/src/main/java/com/infobip/model/WhatsAppWABAConversionEventRequest.java b/src/main/java/com/infobip/model/WhatsAppWABAConversionEventRequest.java new file mode 100644 index 0000000..b22f086 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppWABAConversionEventRequest.java @@ -0,0 +1,179 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Represents WhatsAppWABAConversionEventRequest model. + */ +public class WhatsAppWABAConversionEventRequest { + + private String sourceId; + + private List conversions = new ArrayList<>(); + + /** + * Sets sourceId. + *

+ * Field description: + * Sender as source identifier. This is the phone number registered via the embedded signup flow available in Exchange app. + *

+ * The field is required. + * + * @param sourceId + * @return This {@link WhatsAppWABAConversionEventRequest instance}. + */ + public WhatsAppWABAConversionEventRequest sourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Returns sourceId. + *

+ * Field description: + * Sender as source identifier. This is the phone number registered via the embedded signup flow available in Exchange app. + *

+ * The field is required. + * + * @return sourceId + */ + @JsonProperty("sourceId") + public String getSourceId() { + return sourceId; + } + + /** + * Sets sourceId. + *

+ * Field description: + * Sender as source identifier. This is the phone number registered via the embedded signup flow available in Exchange app. + *

+ * The field is required. + * + * @param sourceId + */ + @JsonProperty("sourceId") + public void setSourceId(String sourceId) { + this.sourceId = sourceId; + } + + /** + * Sets conversions. + *

+ * Field description: + * Conversion events collection. + *

+ * The field is required. + * + * @param conversions + * @return This {@link WhatsAppWABAConversionEventRequest instance}. + */ + public WhatsAppWABAConversionEventRequest conversions(List conversions) { + this.conversions = conversions; + return this; + } + + /** + * Adds and item into conversions. + *

+ * Field description: + * Conversion events collection. + *

+ * The field is required. + * + * @param conversionsItem The item to be added to the list. + * @return This {@link WhatsAppWABAConversionEventRequest instance}. + */ + public WhatsAppWABAConversionEventRequest addConversionsItem(WhatsAppMetaConversionModel conversionsItem) { + if (this.conversions == null) { + this.conversions = new ArrayList<>(); + } + this.conversions.add(conversionsItem); + return this; + } + + /** + * Returns conversions. + *

+ * Field description: + * Conversion events collection. + *

+ * The field is required. + * + * @return conversions + */ + @JsonProperty("conversions") + public List getConversions() { + return conversions; + } + + /** + * Sets conversions. + *

+ * Field description: + * Conversion events collection. + *

+ * The field is required. + * + * @param conversions + */ + @JsonProperty("conversions") + public void setConversions(List conversions) { + this.conversions = conversions; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppWABAConversionEventRequest whatsAppWABAConversionEventRequest = (WhatsAppWABAConversionEventRequest) o; + return Objects.equals(this.sourceId, whatsAppWABAConversionEventRequest.sourceId) + && Objects.equals(this.conversions, whatsAppWABAConversionEventRequest.conversions); + } + + @Override + public int hashCode() { + return Objects.hash(sourceId, conversions); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppWABAConversionEventRequest {") + .append(newLine) + .append(" sourceId: ") + .append(toIndentedString(sourceId)) + .append(newLine) + .append(" conversions: ") + .append(toIndentedString(conversions)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppWebhookMarketingUpdateNotification.java b/src/main/java/com/infobip/model/WhatsAppWebhookMarketingUpdateNotification.java new file mode 100644 index 0000000..72103af --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppWebhookMarketingUpdateNotification.java @@ -0,0 +1,241 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Content of the notification. + */ +public class WhatsAppWebhookMarketingUpdateNotification { + + private String sender; + + private String from; + + private String notificationMessagesStatus; + + private String description; + + /** + * Sets sender. + *

+ * Field description: + * Registered WhatsApp sender number. + * + * @param sender + * @return This {@link WhatsAppWebhookMarketingUpdateNotification instance}. + */ + public WhatsAppWebhookMarketingUpdateNotification sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Returns sender. + *

+ * Field description: + * Registered WhatsApp sender number. + * + * @return sender + */ + @JsonProperty("sender") + public String getSender() { + return sender; + } + + /** + * Sets sender. + *

+ * Field description: + * Registered WhatsApp sender number. + * + * @param sender + */ + @JsonProperty("sender") + public void setSender(String sender) { + this.sender = sender; + } + + /** + * Sets from. + *

+ * Field description: + * End user's phone number. + * + * @param from + * @return This {@link WhatsAppWebhookMarketingUpdateNotification instance}. + */ + public WhatsAppWebhookMarketingUpdateNotification from(String from) { + this.from = from; + return this; + } + + /** + * Returns from. + *

+ * Field description: + * End user's phone number. + * + * @return from + */ + @JsonProperty("from") + public String getFrom() { + return from; + } + + /** + * Sets from. + *

+ * Field description: + * End user's phone number. + * + * @param from + */ + @JsonProperty("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Sets notificationMessagesStatus. + *

+ * Field description: + * Status of marketing update notification. + * + * @param notificationMessagesStatus + * @return This {@link WhatsAppWebhookMarketingUpdateNotification instance}. + */ + public WhatsAppWebhookMarketingUpdateNotification notificationMessagesStatus(String notificationMessagesStatus) { + this.notificationMessagesStatus = notificationMessagesStatus; + return this; + } + + /** + * Returns notificationMessagesStatus. + *

+ * Field description: + * Status of marketing update notification. + * + * @return notificationMessagesStatus + */ + @JsonProperty("notificationMessagesStatus") + public String getNotificationMessagesStatus() { + return notificationMessagesStatus; + } + + /** + * Sets notificationMessagesStatus. + *

+ * Field description: + * Status of marketing update notification. + * + * @param notificationMessagesStatus + */ + @JsonProperty("notificationMessagesStatus") + public void setNotificationMessagesStatus(String notificationMessagesStatus) { + this.notificationMessagesStatus = notificationMessagesStatus; + } + + /** + * Sets description. + *

+ * Field description: + * Description of marketing update notification. + * + * @param description + * @return This {@link WhatsAppWebhookMarketingUpdateNotification instance}. + */ + public WhatsAppWebhookMarketingUpdateNotification description(String description) { + this.description = description; + return this; + } + + /** + * Returns description. + *

+ * Field description: + * Description of marketing update notification. + * + * @return description + */ + @JsonProperty("description") + public String getDescription() { + return description; + } + + /** + * Sets description. + *

+ * Field description: + * Description of marketing update notification. + * + * @param description + */ + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppWebhookMarketingUpdateNotification whatsAppWebhookMarketingUpdateNotification = + (WhatsAppWebhookMarketingUpdateNotification) o; + return Objects.equals(this.sender, whatsAppWebhookMarketingUpdateNotification.sender) + && Objects.equals(this.from, whatsAppWebhookMarketingUpdateNotification.from) + && Objects.equals( + this.notificationMessagesStatus, + whatsAppWebhookMarketingUpdateNotification.notificationMessagesStatus) + && Objects.equals(this.description, whatsAppWebhookMarketingUpdateNotification.description); + } + + @Override + public int hashCode() { + return Objects.hash(sender, from, notificationMessagesStatus, description); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppWebhookMarketingUpdateNotification {") + .append(newLine) + .append(" sender: ") + .append(toIndentedString(sender)) + .append(newLine) + .append(" from: ") + .append(toIndentedString(from)) + .append(newLine) + .append(" notificationMessagesStatus: ") + .append(toIndentedString(notificationMessagesStatus)) + .append(newLine) + .append(" description: ") + .append(toIndentedString(description)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/main/java/com/infobip/model/WhatsAppWebhookMarketingUpdateNotificationResponse.java b/src/main/java/com/infobip/model/WhatsAppWebhookMarketingUpdateNotificationResponse.java new file mode 100644 index 0000000..09c6c94 --- /dev/null +++ b/src/main/java/com/infobip/model/WhatsAppWebhookMarketingUpdateNotificationResponse.java @@ -0,0 +1,186 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Represents WhatsAppWebhookMarketingUpdateNotificationResponse model. + */ +public class WhatsAppWebhookMarketingUpdateNotificationResponse { + + private String from; + + private WhatsAppWebhookMarketingUpdateNotification content; + + private OffsetDateTime createdAt; + + /** + * Sets from. + *

+ * Field description: + * Registered WhatsApp sender number. + * + * @param from + * @return This {@link WhatsAppWebhookMarketingUpdateNotificationResponse instance}. + */ + public WhatsAppWebhookMarketingUpdateNotificationResponse from(String from) { + this.from = from; + return this; + } + + /** + * Returns from. + *

+ * Field description: + * Registered WhatsApp sender number. + * + * @return from + */ + @JsonProperty("from") + public String getFrom() { + return from; + } + + /** + * Sets from. + *

+ * Field description: + * Registered WhatsApp sender number. + * + * @param from + */ + @JsonProperty("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Sets content. + * + * @param content + * @return This {@link WhatsAppWebhookMarketingUpdateNotificationResponse instance}. + */ + public WhatsAppWebhookMarketingUpdateNotificationResponse content( + WhatsAppWebhookMarketingUpdateNotification content) { + this.content = content; + return this; + } + + /** + * Returns content. + * + * @return content + */ + @JsonProperty("content") + public WhatsAppWebhookMarketingUpdateNotification getContent() { + return content; + } + + /** + * Sets content. + * + * @param content + */ + @JsonProperty("content") + public void setContent(WhatsAppWebhookMarketingUpdateNotification content) { + this.content = content; + } + + /** + * Sets createdAt. + *

+ * Field description: + * Tells when the event occurred. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. + * + * @param createdAt + * @return This {@link WhatsAppWebhookMarketingUpdateNotificationResponse instance}. + */ + public WhatsAppWebhookMarketingUpdateNotificationResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Returns createdAt. + *

+ * Field description: + * Tells when the event occurred. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. + * + * @return createdAt + */ + @JsonProperty("createdAt") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * Sets createdAt. + *

+ * Field description: + * Tells when the event occurred. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. + * + * @param createdAt + */ + @JsonProperty("createdAt") + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WhatsAppWebhookMarketingUpdateNotificationResponse whatsAppWebhookMarketingUpdateNotificationResponse = + (WhatsAppWebhookMarketingUpdateNotificationResponse) o; + return Objects.equals(this.from, whatsAppWebhookMarketingUpdateNotificationResponse.from) + && Objects.equals(this.content, whatsAppWebhookMarketingUpdateNotificationResponse.content) + && Objects.equals(this.createdAt, whatsAppWebhookMarketingUpdateNotificationResponse.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash(from, content, createdAt); + } + + @Override + public String toString() { + String newLine = System.lineSeparator(); + return new StringBuilder() + .append("class WhatsAppWebhookMarketingUpdateNotificationResponse {") + .append(newLine) + .append(" from: ") + .append(toIndentedString(from)) + .append(newLine) + .append(" content: ") + .append(toIndentedString(content)) + .append(newLine) + .append(" createdAt: ") + .append(toIndentedString(createdAt)) + .append(newLine) + .append("}") + .toString(); + } + + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + String lineSeparator = System.lineSeparator(); + String lineSeparatorFollowedByIndentation = lineSeparator + " "; + return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); + } +} diff --git a/src/test/java/com/infobip/RequestFactoryTest.java b/src/test/java/com/infobip/RequestFactoryTest.java index 06dfa8f..36088ee 100644 --- a/src/test/java/com/infobip/RequestFactoryTest.java +++ b/src/test/java/com/infobip/RequestFactoryTest.java @@ -38,7 +38,7 @@ class RequestFactoryTest { private static final String GIVEN_API_KEY_VALUE = "apiKeyValue"; private static final ApiKey GIVEN_API_KEY = ApiKey.from(GIVEN_API_KEY_VALUE); - private static final String EXPECTED_USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.3.0"; + private static final String EXPECTED_USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.4.0"; private final OkHttpClient client = new OkHttpClient(); private final JSON json = new JSON(); diff --git a/src/test/java/com/infobip/api/CallsApiTest.java b/src/test/java/com/infobip/api/CallsApiTest.java index c8a5c8a..185316a 100644 --- a/src/test/java/com/infobip/api/CallsApiTest.java +++ b/src/test/java/com/infobip/api/CallsApiTest.java @@ -7204,17 +7204,25 @@ void shouldResetSipTrunkPassword() { String givenPassword = "fkZ1921tM87"; String givenResponse = String.format( - "{\n" + " \"username\": \"%s\",\n" + " \"password\": \"%s\"\n" + "}", givenUsername, givenPassword); + "{\n" + + " \"type\": \"REGISTERED\",\n" + + " \"username\": \"%s\",\n" + + " \"password\": \"%s\"\n" + + "}", + givenUsername, givenPassword); setUpEmptyPostRequest( SIP_TRUNK_RESET_PASSWORD.replace("{sipTrunkId}", sipTrunkId), Map.of(), givenResponse, 200); CallsApi api = new CallsApi(getApiClient()); - Consumer assertions = (response) -> { + Consumer assertions = (response) -> { then(response).isNotNull(); - then(response.getUsername()).isEqualTo(givenUsername); - then(response.getPassword()).isEqualTo(givenPassword); + then(response.getClass()).isEqualTo(CallsSipTrunkRegisteredResetPasswordResponse.class); + CallsSipTrunkRegisteredResetPasswordResponse registeredResponse = + (CallsSipTrunkRegisteredResetPasswordResponse) response; + then(registeredResponse.getUsername()).isEqualTo(givenUsername); + then(registeredResponse.getPassword()).isEqualTo(givenPassword); }; var call = api.resetSipTrunkPassword(sipTrunkId); diff --git a/src/test/java/com/infobip/api/MessagesApiTest.java b/src/test/java/com/infobip/api/MessagesApiTest.java index 7db1394..53b4bdb 100644 --- a/src/test/java/com/infobip/api/MessagesApiTest.java +++ b/src/test/java/com/infobip/api/MessagesApiTest.java @@ -1852,7 +1852,8 @@ void shouldSendMessagesEvent() { String givenName = "MESSAGE_ACCEPTED"; String givenDescription = "Message sent to next instance"; String givenDestination = "48600700800"; - MessagesApiOutboundEventChannel givenChannel = MessagesApiOutboundEventChannel.APPLE_MB; + MessagesApiOutboundTypingStartedEventChannel givenChannel = + MessagesApiOutboundTypingStartedEventChannel.APPLE_MB; String givenSender = "447491163443"; String givenTo = "111111111"; String givenEvent = "TYPING_STARTED"; diff --git a/src/test/java/com/infobip/api/NumbersApiTest.java b/src/test/java/com/infobip/api/NumbersApiTest.java new file mode 100644 index 0000000..5619a32 --- /dev/null +++ b/src/test/java/com/infobip/api/NumbersApiTest.java @@ -0,0 +1,5300 @@ +package com.infobip.api; + +import static org.assertj.core.api.BDDAssertions.then; + +import com.infobip.JSON; +import com.infobip.model.*; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.function.Consumer; +import org.junit.jupiter.api.Test; + +class NumbersApiTest extends ApiTest { + + private static final String OWNED_NUMBERS = "/numbers/1/numbers"; + private static final String OWNED_NUMBER = "/numbers/1/numbers/{numberKey}"; + private static final String OWNED_NUMBER_VOICE = "/numbers/2/numbers/{numberKey}/voice"; + private static final String OWNED_NUMBER_CNAM = "/numbers/2/numbers/{numberKey}/voice/cnam"; + private static final String OWNED_NUMBER_CNAM_STATUS = "/numbers/2/numbers/{numberKey}/voice/cnam/status"; + private static final String OWNED_NUMBER_EMERGENCY_SERVICE_VALIDATE = + "/numbers/2/numbers/{numberKey}/voice/emergency-service/validate-address"; + private static final String OWNED_NUMBER_EMERGENCY_SERVICE = + "/numbers/2/numbers/{numberKey}/voice/emergency-service"; + private static final String OWNED_NUMBER_EMERGENCY_SERVICE_STATUS = + "/numbers/2/numbers/{numberKey}/voice/emergency-service/status"; + private static final String RECORDING_CONFIGURATION = "/voice/recording/1/configuration/numbers"; + private static final String RECORDING_CONFIGURATION_NUMBER = "/voice/recording/1/configuration/numbers/{key}"; + private static final String BRANDS = "/number-registration/1/brands"; + private static final String BRAND = "/number-registration/1/brands/{brandId}"; + private static final String REGISTER_BRAND = "/number-registration/1/brands/{brandId}/register"; + private static final String BRAND_REGISTRAR_STATUSES = "/number-registration/1/brands/{brandId}/registrar-statuses"; + private static final String BRAND_AUTH_VERIFICATION = + "/number-registration/1/brands/{brandId}/brand-auth-verification"; + private static final String BRAND_RESEND_2FA = "/number-registration/1/brands/{brandId}/resend2fa"; + private static final String BRAND_VETS = "/number-registration/1/brands/{brandId}/vets"; + private static final String BRAND_VET = "/number-registration/1/brands/{brandId}/vets/{vetId}"; + private static final String BRAND_VET_IMPORT = "/number-registration/1/brands/{brandId}/vets/import"; + private static final String BRAND_VET_REPORT = "/number-registration/1/brands/{brandId}/vets/{vetId}/report"; + private static final String CAMPAIGNS = "/number-registration/1/campaigns"; + private static final String CAMPAIGNS_TOLL_FREE = "/number-registration/1/campaigns/toll-free"; + private static final String CAMPAIGN = "/number-registration/1/campaigns/{campaignId}"; + private static final String REGISTER_CAMPAIGN = "/number-registration/1/campaigns/{campaignId}/register"; + private static final String CAMPAIGN_NETWORK_STATUSES = + "/number-registration/1/campaigns/{campaignId}/network-statuses"; + private static final String DEREGISTER_CAMPAIGN = "/number-registration/1/campaigns/{campaignId}/deregister"; + private static final String UPDATE_REGISTRATION = + "/number-registration/1/campaigns/{campaignId}/update-registration"; + private static final String ADD_NUMBERS = "/number-registration/1/campaigns/{campaignId}/add-numbers"; + private static final String REMOVE_NUMBERS = "/number-registration/1/campaigns/{campaignId}/remove-numbers"; + private static final String CAMPAIGN_NUMBERS = "/number-registration/1/campaigns/{campaignId}/numbers"; + private static final String APPEAL_CAMPAIGN = "/number-registration/1/campaigns/{campaignId}/appeal"; + private static final String CAMPAIGN_PRIORITIES = "/number-registration/1/campaigns/priorities"; + private static final String ATTACH_NUMBER_POOL = "/number-registration/1/campaigns/{campaignId}/number-pool/attach"; + private static final String DETACH_NUMBER_POOL = "/number-registration/1/campaigns/{campaignId}/number-pool/detach"; + private static final String NUMBER_POOLS = "/number-registration/1/number-pools"; + private static final String DOCUMENTS = "/number-registration/1/documents"; + private static final String DOCUMENT = "/number-registration/1/documents/{documentId}"; + private static final String AUTOMATIC_REVIEW_CAMPAIGN = + "/number-registration/1/automatic-review/campaigns/{campaignUuid}"; + private static final String AUTOMATIC_REVIEW = "/number-registration/1/automatic-review"; + private static final String AUTOMATIC_REVIEW_RESULTS = "/number-registration/1/automatic-review/{requestUuid}"; + + @Test + void shouldListOwnedNumbers() { + String givenNumberKey = "6FED0BC540BFADD9B05ED7D89AAC22FA"; + String givenNumber = "447860041117"; + String givenCountry = "GB"; + String givenCountryName = "United Kingdom"; + NumberType givenType = NumberType.VIRTUAL_LONG_NUMBER; + NumbersNumberCapabilityType givenCapability = NumbersNumberCapabilityType.SMS; + Boolean givenShared = false; + Double givenPricePerMonth = 5.0; + Double givenSetupPrice = 0.0; + String givenCurrency = "EUR"; + String givenNetwork = "02 (Telefonica UK Ltd)"; + String givenKeyword1 = "test"; + String givenKeyword2 = "stop"; + Boolean givenAdditionalSetupRequired = false; + Boolean givenCanEditNumber = true; + Boolean givenCanEditConfiguration = true; + String givenApplicationId = "default"; + Long givenNumberCount = 1L; + + String givenResponse = String.format( + "{\n" + " \"numbers\": [\n" + + " {\n" + + " \"numberKey\": \"%s\",\n" + + " \"number\": \"%s\",\n" + + " \"country\": \"%s\",\n" + + " \"countryName\": \"%s\",\n" + + " \"type\": \"%s\",\n" + + " \"capabilities\": [\n" + + " \"%s\"\n" + + " ],\n" + + " \"shared\": %b,\n" + + " \"price\": {\n" + + " \"pricePerMonth\": %s,\n" + + " \"setupPrice\": %s,\n" + + " \"currency\": \"%s\"\n" + + " },\n" + + " \"network\": \"%s\",\n" + + " \"keywords\": [\n" + + " \"%s\",\n" + + " \"%s\"\n" + + " ],\n" + + " \"additionalSetupRequired\": %b,\n" + + " \"editPermissions\": {\n" + + " \"canEditNumber\": %b,\n" + + " \"canEditConfiguration\": %b\n" + + " },\n" + + " \"applicationId\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"numberCount\": %d\n" + + "}\n", + givenNumberKey, + givenNumber, + givenCountry, + givenCountryName, + givenType, + givenCapability, + givenShared, + givenPricePerMonth.intValue(), + givenSetupPrice.intValue(), + givenCurrency, + givenNetwork, + givenKeyword1, + givenKeyword2, + givenAdditionalSetupRequired, + givenCanEditNumber, + givenCanEditConfiguration, + givenApplicationId, + givenNumberCount); + + setUpSuccessGetRequest(OWNED_NUMBERS, Map.of(), givenResponse); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new NumbersResponse() + .addNumbersItem(new NumbersNumberResponse() + .numberKey(givenNumberKey) + .number(givenNumber) + .country(givenCountry) + .countryName(givenCountryName) + .type(givenType) + .addCapabilitiesItem(givenCapability) + .shared(givenShared) + .price(new NumbersNumberPrice() + .pricePerMonth(givenPricePerMonth) + .setupPrice(givenSetupPrice) + .currency(givenCurrency)) + .network(givenNetwork) + .addKeywordsItem(givenKeyword1) + .addKeywordsItem(givenKeyword2) + .additionalSetupRequired(givenAdditionalSetupRequired) + .editPermissions(new NumbersEditPermissions() + .canEditNumber(givenCanEditNumber) + .canEditConfiguration(givenCanEditConfiguration)) + .applicationId(givenApplicationId)) + .numberCount(givenNumberCount); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.listOwnedNumbers(); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetSingleOwnedNumber() { + String givenNumberKey = "6FED0BC540BFADD9B05ED7D89AAC22FA"; + String givenNumber = "447860041117"; + String givenCountry = "GB"; + NumberType givenType = NumberType.VIRTUAL_LONG_NUMBER; + NumbersNumberCapabilityType givenCapability = NumbersNumberCapabilityType.SMS; + Boolean givenShared = false; + Double givenPricePerMonth = 5.0; + Double givenSetupPrice = 0.0; + String givenCurrency = "EUR"; + + String givenResponse = String.format( + "{\n" + " \"numberKey\": \"%s\",\n" + + " \"number\": \"%s\",\n" + + " \"country\": \"%s\",\n" + + " \"type\": \"%s\",\n" + + " \"capabilities\": [\n" + + " \"%s\"\n" + + " ],\n" + + " \"shared\": %b,\n" + + " \"price\": {\n" + + " \"pricePerMonth\": %s,\n" + + " \"setupPrice\": %s,\n" + + " \"currency\": \"%s\"\n" + + " }\n" + + "}\n", + givenNumberKey, + givenNumber, + givenCountry, + givenType, + givenCapability, + givenShared, + givenPricePerMonth.intValue(), + givenSetupPrice.intValue(), + givenCurrency); + + setUpSuccessGetRequest(OWNED_NUMBER.replace("{numberKey}", givenNumberKey), Map.of(), givenResponse); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new NumbersNumberResponse() + .numberKey(givenNumberKey) + .number(givenNumber) + .country(givenCountry) + .type(givenType) + .addCapabilitiesItem(givenCapability) + .shared(givenShared) + .price(new NumbersNumberPrice() + .pricePerMonth(givenPricePerMonth) + .setupPrice(givenSetupPrice) + .currency(givenCurrency)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.getSingleOwnedNumber(givenNumberKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateOwnedNumber() { + String givenNumberKey = "58B3840032C7774BAC840EEEA2C23A44"; + String givenApplicationId = "appId"; + String givenEntityId = "entId"; + + String givenNumber = "447860041117"; + String givenCountry = "GB"; + NumberType givenType = NumberType.VIRTUAL_LONG_NUMBER; + NumbersNumberCapabilityType givenCapability = NumbersNumberCapabilityType.SMS; + Boolean givenShared = false; + Double givenPricePerMonth = 5.0; + Double givenSetupPrice = 0.0; + String givenCurrency = "EUR"; + + String expectedRequest = String.format( + "{\n" + " \"applicationId\": \"%s\",\n" + " \"entityId\": \"%s\"\n" + "}\n", + givenApplicationId, givenEntityId); + + String givenResponse = String.format( + "{\n" + " \"numberKey\": \"%s\",\n" + + " \"number\": \"%s\",\n" + + " \"country\": \"%s\",\n" + + " \"type\": \"%s\",\n" + + " \"capabilities\": [\n" + + " \"%s\"\n" + + " ],\n" + + " \"shared\": %b,\n" + + " \"price\": {\n" + + " \"pricePerMonth\": %s,\n" + + " \"setupPrice\": %s,\n" + + " \"currency\": \"%s\"\n" + + " },\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + + "}\n", + givenNumberKey, + givenNumber, + givenCountry, + givenType, + givenCapability, + givenShared, + givenPricePerMonth.intValue(), + givenSetupPrice.intValue(), + givenCurrency, + givenApplicationId, + givenEntityId); + + setUpSuccessPutRequest( + OWNED_NUMBER.replace("{numberKey}", givenNumberKey), Map.of(), expectedRequest, givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new NumbersUpdateOwnedNumberRequest() + .applicationId(givenApplicationId) + .entityId(givenEntityId); + + var expectedResponse = new NumbersNumberResponse() + .numberKey(givenNumberKey) + .number(givenNumber) + .country(givenCountry) + .type(givenType) + .addCapabilitiesItem(givenCapability) + .shared(givenShared) + .price(new NumbersNumberPrice() + .pricePerMonth(givenPricePerMonth) + .setupPrice(givenSetupPrice) + .currency(givenCurrency)) + .applicationId(givenApplicationId) + .entityId(givenEntityId); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.updateOwnedNumber(givenNumberKey, request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCancelNumber() { + String givenNumberKey = "58B3840032C7774BAC840EEEA2C23A44"; + + setUpNoResponseBodyDeleteRequest(OWNED_NUMBER.replace("{numberKey}", givenNumberKey), Map.of(), 204); + + var api = new NumbersApi(getApiClient()); + + var call = api.cancelNumber(givenNumberKey); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldGetVoiceSetupOnNumber() { + String givenNumberKey = "6FED0BC540BFADD9B05ED7D89AAC22FA"; + String givenVoiceNumberMaskingConfigKey = "C6A5995CBF4D2DF2ADE29963B3BB00E6"; + MoActionType givenType = MoActionType.VOICE_NUMBER_MASKING; + + String givenResponse = String.format( + "{\n" + " \"action\": {\n" + + " \"voiceNumberMaskingConfigKey\": \"%s\",\n" + + " \"type\": \"%s\"\n" + + " }\n" + + "}\n", + givenVoiceNumberMaskingConfigKey, givenType); + + setUpSuccessGetRequest(OWNED_NUMBER_VOICE.replace("{numberKey}", givenNumberKey), Map.of(), givenResponse); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new NumbersVoiceSetup() + .action(new NumbersVoiceNumberMaskingActionDetails() + .voiceNumberMaskingConfigKey(givenVoiceNumberMaskingConfigKey)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.getVoiceSetupOnNumber(givenNumberKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateVoiceSetupOnNumber() { + String givenNumberKey = "6FED0BC540BFADD9B05ED7D89AAC22FA"; + String givenVoiceNumberMaskingConfigKey = "C6A5995CBF4D2DF2ADE29963B3BB00E6"; + MoActionType givenType = MoActionType.VOICE_NUMBER_MASKING; + + String expectedRequest = String.format( + "{\n" + " \"action\": {\n" + + " \"voiceNumberMaskingConfigKey\": \"%s\",\n" + + " \"type\": \"%s\"\n" + + " }\n" + + "}\n", + givenVoiceNumberMaskingConfigKey, givenType); + + String givenResponse = String.format( + "{\n" + " \"action\": {\n" + + " \"voiceNumberMaskingConfigKey\": \"%s\",\n" + + " \"type\": \"%s\"\n" + + " }\n" + + "}\n", + givenVoiceNumberMaskingConfigKey, givenType); + + setUpSuccessPutRequest( + OWNED_NUMBER_VOICE.replace("{numberKey}", givenNumberKey), Map.of(), expectedRequest, givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new NumbersVoiceSetup() + .action(new NumbersVoiceNumberMaskingActionDetails() + .voiceNumberMaskingConfigKey(givenVoiceNumberMaskingConfigKey)); + + var expectedResponse = new NumbersVoiceSetup() + .action(new NumbersVoiceNumberMaskingActionDetails() + .voiceNumberMaskingConfigKey(givenVoiceNumberMaskingConfigKey)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.updateVoiceSetupOnNumber(givenNumberKey, request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCreateVoiceSetupOnNumber() { + String givenNumberKey = "6FED0BC540BFADD9B05ED7D89AAC22FA"; + String givenVoiceNumberMaskingConfigKey = "C6A5995CBF4D2DF2ADE29963B3BB00E6"; + MoActionType givenType = MoActionType.VOICE_NUMBER_MASKING; + + String expectedRequest = String.format( + "{\n" + " \"action\": {\n" + + " \"voiceNumberMaskingConfigKey\": \"%s\",\n" + + " \"type\": \"%s\"\n" + + " }\n" + + "}\n", + givenVoiceNumberMaskingConfigKey, givenType); + + String givenResponse = String.format( + "{\n" + " \"action\": {\n" + + " \"voiceNumberMaskingConfigKey\": \"%s\",\n" + + " \"type\": \"%s\"\n" + + " }\n" + + "}\n", + givenVoiceNumberMaskingConfigKey, givenType); + + setUpSuccessPostRequest( + OWNED_NUMBER_VOICE.replace("{numberKey}", givenNumberKey), expectedRequest, givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new NumbersVoiceSetup() + .action(new NumbersVoiceNumberMaskingActionDetails() + .voiceNumberMaskingConfigKey(givenVoiceNumberMaskingConfigKey)); + + var expectedResponse = new NumbersVoiceSetup() + .action(new NumbersVoiceNumberMaskingActionDetails() + .voiceNumberMaskingConfigKey(givenVoiceNumberMaskingConfigKey)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.createVoiceSetupOnNumber(givenNumberKey, request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDeleteVoiceSetupOnNumber() { + String givenNumberKey = "6FED0BC540BFADD9B05ED7D89AAC22FA"; + + setUpNoResponseBodyDeleteRequest(OWNED_NUMBER_VOICE.replace("{numberKey}", givenNumberKey), Map.of(), 204); + + var api = new NumbersApi(getApiClient()); + + var call = api.deleteVoiceSetupOnNumber(givenNumberKey); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldGetCnam() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + Boolean givenStorageEnabled = false; + String givenStorageName = "string"; + Boolean givenDeliveryEnabled = false; + + String givenResponse = String.format( + "{\n" + " \"storage\": {\n" + + " \"enabled\": %b,\n" + + " \"name\": \"%s\"\n" + + " },\n" + + " \"delivery\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenStorageEnabled, givenStorageName, givenDeliveryEnabled); + + setUpSuccessGetRequest(OWNED_NUMBER_CNAM.replace("{numberKey}", givenNumberKey), Map.of(), givenResponse); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new CallsCnam() + .storage(new CallsCnamStorage().enabled(givenStorageEnabled).name(givenStorageName)) + .delivery(new CallsCnamDelivery().enabled(givenDeliveryEnabled)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.getCnam(givenNumberKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateCnam() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + Boolean givenStorageEnabled = false; + String givenStorageName = "string"; + Boolean givenDeliveryEnabled = false; + + String expectedRequest = String.format( + "{\n" + " \"storage\": {\n" + + " \"enabled\": %b,\n" + + " \"name\": \"%s\"\n" + + " },\n" + + " \"delivery\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenStorageEnabled, givenStorageName, givenDeliveryEnabled); + + String givenResponse = String.format( + "{\n" + " \"storage\": {\n" + + " \"enabled\": %b,\n" + + " \"name\": \"%s\"\n" + + " },\n" + + " \"delivery\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenStorageEnabled, givenStorageName, givenDeliveryEnabled); + + setUpSuccessPutRequest( + OWNED_NUMBER_CNAM.replace("{numberKey}", givenNumberKey), Map.of(), expectedRequest, givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new CallsCnam() + .storage(new CallsCnamStorage().enabled(givenStorageEnabled).name(givenStorageName)) + .delivery(new CallsCnamDelivery().enabled(givenDeliveryEnabled)); + + var expectedResponse = new CallsCnam() + .storage(new CallsCnamStorage().enabled(givenStorageEnabled).name(givenStorageName)) + .delivery(new CallsCnamDelivery().enabled(givenDeliveryEnabled)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.updateCnam(givenNumberKey, request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCreateCnam() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + Boolean givenStorageEnabled = false; + String givenStorageName = "string"; + Boolean givenDeliveryEnabled = false; + + String expectedRequest = String.format( + "{\n" + " \"storage\": {\n" + + " \"enabled\": %b,\n" + + " \"name\": \"%s\"\n" + + " },\n" + + " \"delivery\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenStorageEnabled, givenStorageName, givenDeliveryEnabled); + + String givenResponse = String.format( + "{\n" + " \"storage\": {\n" + + " \"enabled\": %b,\n" + + " \"name\": \"%s\"\n" + + " },\n" + + " \"delivery\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenStorageEnabled, givenStorageName, givenDeliveryEnabled); + + setUpSuccessPostRequest( + OWNED_NUMBER_CNAM.replace("{numberKey}", givenNumberKey), expectedRequest, givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new CallsCnam() + .storage(new CallsCnamStorage().enabled(givenStorageEnabled).name(givenStorageName)) + .delivery(new CallsCnamDelivery().enabled(givenDeliveryEnabled)); + + var expectedResponse = new CallsCnam() + .storage(new CallsCnamStorage().enabled(givenStorageEnabled).name(givenStorageName)) + .delivery(new CallsCnamDelivery().enabled(givenDeliveryEnabled)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.createCnam(givenNumberKey, request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDeleteCnam() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + Boolean givenStorageEnabled = false; + String givenStorageName = "string"; + Boolean givenDeliveryEnabled = false; + + String givenResponse = String.format( + "{\n" + " \"storage\": {\n" + + " \"enabled\": %b,\n" + + " \"name\": \"%s\"\n" + + " },\n" + + " \"delivery\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenStorageEnabled, givenStorageName, givenDeliveryEnabled); + + setUpNoRequestBodyDeleteRequest( + OWNED_NUMBER_CNAM.replace("{numberKey}", givenNumberKey), Collections.emptyMap(), givenResponse, 200); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new CallsCnam() + .storage(new CallsCnamStorage().enabled(givenStorageEnabled).name(givenStorageName)) + .delivery(new CallsCnamDelivery().enabled(givenDeliveryEnabled)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.deleteCnam(givenNumberKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetCnamStatus() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + CallsStatus givenStorageStatus = CallsStatus.PENDING; + String givenStorageReason = "string"; + CallsStatus givenDeliveryStatus = CallsStatus.PENDING; + String givenDeliveryReason = "string"; + + String givenResponse = String.format( + "{\n" + " \"storage\": {\n" + + " \"status\": \"%s\",\n" + + " \"reason\": \"%s\"\n" + + " },\n" + + " \"delivery\": {\n" + + " \"status\": \"%s\",\n" + + " \"reason\": \"%s\"\n" + + " }\n" + + "}\n", + givenStorageStatus, givenStorageReason, givenDeliveryStatus, givenDeliveryReason); + + setUpSuccessGetRequest( + OWNED_NUMBER_CNAM_STATUS.replace("{numberKey}", givenNumberKey), Collections.emptyMap(), givenResponse); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new CallsPublicCnamStatus() + .storage(new CallsCnamStorageStatus().status(givenStorageStatus).reason(givenStorageReason)) + .delivery(new CallsCnamDeliveryStatus() + .status(givenDeliveryStatus) + .reason(givenDeliveryReason)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.getCnamStatus(givenNumberKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldValidateEmergencyServiceAddress() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + String givenName = "string"; + String givenStreetName = "string"; + String givenStreetNumber = "string"; + String givenCity = "string"; + String givenCountryCode = "st"; + String givenStateCode = "st"; + String givenZipCode = "string"; + CallsDirection givenDirection = CallsDirection.NORTH; + String givenSuite = "string"; + + String expectedRequest = String.format( + "{\n" + + " \"name\": \"%s\",\n" + + " \"streetName\": \"%s\",\n" + + " \"streetNumber\": \"%s\",\n" + + " \"city\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"stateCode\": \"%s\",\n" + + " \"zipCode\": \"%s\",\n" + + " \"direction\": \"%s\",\n" + + " \"suite\": \"%s\"\n" + + "}\n", + givenName, + givenStreetName, + givenStreetNumber, + givenCity, + givenCountryCode, + givenStateCode, + givenZipCode, + givenDirection, + givenSuite); + + String givenResponse = String.format( + "{\n" + + " \"validAddresses\": [\n" + + " {\n" + + " \"name\": \"%s\",\n" + + " \"streetName\": \"%s\",\n" + + " \"streetNumber\": \"%s\",\n" + + " \"city\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"stateCode\": \"%s\",\n" + + " \"zipCode\": \"%s\",\n" + + " \"direction\": \"%s\",\n" + + " \"suite\": \"%s\"\n" + + " }\n" + + " ]\n" + + "}\n", + givenName, + givenStreetName, + givenStreetNumber, + givenCity, + givenCountryCode, + givenStateCode, + givenZipCode, + givenDirection, + givenSuite); + + setUpSuccessPostRequest( + OWNED_NUMBER_EMERGENCY_SERVICE_VALIDATE.replace("{numberKey}", givenNumberKey), + expectedRequest, + givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new CallsAddress() + .name(givenName) + .streetName(givenStreetName) + .streetNumber(givenStreetNumber) + .city(givenCity) + .countryCode(givenCountryCode) + .stateCode(givenStateCode) + .zipCode(givenZipCode) + .direction(givenDirection) + .suite(givenSuite); + + var expectedResponse = new CallsValidateAddressResponse() + .addValidAddressesItem(new CallsAddress() + .name(givenName) + .streetName(givenStreetName) + .streetNumber(givenStreetNumber) + .city(givenCity) + .countryCode(givenCountryCode) + .stateCode(givenStateCode) + .zipCode(givenZipCode) + .direction(givenDirection) + .suite(givenSuite)); + + Consumer assertions = + response -> then(response).isEqualTo(expectedResponse); + + var call = api.validateEmergencyService(givenNumberKey, request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetEmergencyServiceAddress() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + Boolean givenEnabled = false; + String givenName = "string"; + String givenStreetName = "string"; + String givenStreetNumber = "string"; + String givenCity = "string"; + String givenCountryCode = "st"; + String givenStateCode = "st"; + String givenZipCode = "string"; + CallsDirection givenDirection = CallsDirection.NORTH; + String givenSuite = "string"; + + String givenResponse = String.format( + "{\n" + + " \"enabled\": %b,\n" + + " \"address\": {\n" + + " \"name\": \"%s\",\n" + + " \"streetName\": \"%s\",\n" + + " \"streetNumber\": \"%s\",\n" + + " \"city\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"stateCode\": \"%s\",\n" + + " \"zipCode\": \"%s\",\n" + + " \"direction\": \"%s\",\n" + + " \"suite\": \"%s\"\n" + + " }\n" + + "}\n", + givenEnabled, + givenName, + givenStreetName, + givenStreetNumber, + givenCity, + givenCountryCode, + givenStateCode, + givenZipCode, + givenDirection, + givenSuite); + + setUpSuccessGetRequest( + OWNED_NUMBER_EMERGENCY_SERVICE.replace("{numberKey}", givenNumberKey), + Collections.emptyMap(), + givenResponse); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new CallsEmergencyAddress() + .enabled(givenEnabled) + .address(new CallsAddress() + .name(givenName) + .streetName(givenStreetName) + .streetNumber(givenStreetNumber) + .city(givenCity) + .countryCode(givenCountryCode) + .stateCode(givenStateCode) + .zipCode(givenZipCode) + .direction(givenDirection) + .suite(givenSuite)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.getEmergencyService(givenNumberKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateEmergencyServiceAddress() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + Boolean givenEnabled = false; + String givenName = "string"; + String givenStreetName = "string"; + String givenStreetNumber = "string"; + String givenCity = "string"; + String givenCountryCode = "st"; + String givenStateCode = "st"; + String givenZipCode = "string"; + CallsDirection givenDirection = CallsDirection.NORTH; + String givenSuite = "string"; + + String expectedRequest = String.format( + "{\n" + + " \"enabled\": %b,\n" + + " \"address\": {\n" + + " \"name\": \"%s\",\n" + + " \"streetName\": \"%s\",\n" + + " \"streetNumber\": \"%s\",\n" + + " \"city\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"stateCode\": \"%s\",\n" + + " \"zipCode\": \"%s\",\n" + + " \"direction\": \"%s\",\n" + + " \"suite\": \"%s\"\n" + + " }\n" + + "}\n", + givenEnabled, + givenName, + givenStreetName, + givenStreetNumber, + givenCity, + givenCountryCode, + givenStateCode, + givenZipCode, + givenDirection, + givenSuite); + + String givenResponse = String.format( + "{\n" + + " \"enabled\": %b,\n" + + " \"address\": {\n" + + " \"name\": \"%s\",\n" + + " \"streetName\": \"%s\",\n" + + " \"streetNumber\": \"%s\",\n" + + " \"city\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"stateCode\": \"%s\",\n" + + " \"zipCode\": \"%s\",\n" + + " \"direction\": \"%s\",\n" + + " \"suite\": \"%s\"\n" + + " }\n" + + "}\n", + givenEnabled, + givenName, + givenStreetName, + givenStreetNumber, + givenCity, + givenCountryCode, + givenStateCode, + givenZipCode, + givenDirection, + givenSuite); + + setUpSuccessPutRequest( + OWNED_NUMBER_EMERGENCY_SERVICE.replace("{numberKey}", givenNumberKey), + Collections.emptyMap(), + expectedRequest, + givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new CallsEmergencyAddress() + .enabled(givenEnabled) + .address(new CallsAddress() + .name(givenName) + .streetName(givenStreetName) + .streetNumber(givenStreetNumber) + .city(givenCity) + .countryCode(givenCountryCode) + .stateCode(givenStateCode) + .zipCode(givenZipCode) + .direction(givenDirection) + .suite(givenSuite)); + + var expectedResponse = new CallsEmergencyAddress() + .enabled(givenEnabled) + .address(new CallsAddress() + .name(givenName) + .streetName(givenStreetName) + .streetNumber(givenStreetNumber) + .city(givenCity) + .countryCode(givenCountryCode) + .stateCode(givenStateCode) + .zipCode(givenZipCode) + .direction(givenDirection) + .suite(givenSuite)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.updateEmergencyService(givenNumberKey, request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCreateEmergencyServiceAddress() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + Boolean givenEnabled = false; + String givenName = "string"; + String givenStreetName = "string"; + String givenStreetNumber = "string"; + String givenCity = "string"; + String givenCountryCode = "st"; + String givenStateCode = "st"; + String givenZipCode = "string"; + CallsDirection givenDirection = CallsDirection.NORTH; + String givenSuite = "string"; + + String expectedRequest = String.format( + "{\n" + + " \"enabled\": %b,\n" + + " \"address\": {\n" + + " \"name\": \"%s\",\n" + + " \"streetName\": \"%s\",\n" + + " \"streetNumber\": \"%s\",\n" + + " \"city\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"stateCode\": \"%s\",\n" + + " \"zipCode\": \"%s\",\n" + + " \"direction\": \"%s\",\n" + + " \"suite\": \"%s\"\n" + + " }\n" + + "}\n", + givenEnabled, + givenName, + givenStreetName, + givenStreetNumber, + givenCity, + givenCountryCode, + givenStateCode, + givenZipCode, + givenDirection, + givenSuite); + + String givenResponse = String.format( + "{\n" + + " \"enabled\": %b,\n" + + " \"address\": {\n" + + " \"name\": \"%s\",\n" + + " \"streetName\": \"%s\",\n" + + " \"streetNumber\": \"%s\",\n" + + " \"city\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"stateCode\": \"%s\",\n" + + " \"zipCode\": \"%s\",\n" + + " \"direction\": \"%s\",\n" + + " \"suite\": \"%s\"\n" + + " }\n" + + "}\n", + givenEnabled, + givenName, + givenStreetName, + givenStreetNumber, + givenCity, + givenCountryCode, + givenStateCode, + givenZipCode, + givenDirection, + givenSuite); + + setUpSuccessPostRequest( + OWNED_NUMBER_EMERGENCY_SERVICE.replace("{numberKey}", givenNumberKey), expectedRequest, givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new CallsEmergencyAddress() + .enabled(givenEnabled) + .address(new CallsAddress() + .name(givenName) + .streetName(givenStreetName) + .streetNumber(givenStreetNumber) + .city(givenCity) + .countryCode(givenCountryCode) + .stateCode(givenStateCode) + .zipCode(givenZipCode) + .direction(givenDirection) + .suite(givenSuite)); + + var expectedResponse = new CallsEmergencyAddress() + .enabled(givenEnabled) + .address(new CallsAddress() + .name(givenName) + .streetName(givenStreetName) + .streetNumber(givenStreetNumber) + .city(givenCity) + .countryCode(givenCountryCode) + .stateCode(givenStateCode) + .zipCode(givenZipCode) + .direction(givenDirection) + .suite(givenSuite)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.createEmergencyService(givenNumberKey, request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDeleteEmergencyServiceAddress() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + Boolean givenEnabled = false; + String givenName = "string"; + String givenStreetName = "string"; + String givenStreetNumber = "string"; + String givenCity = "string"; + String givenCountryCode = "st"; + String givenStateCode = "st"; + String givenZipCode = "string"; + CallsDirection givenDirection = CallsDirection.NORTH; + String givenSuite = "string"; + + String givenResponse = String.format( + "{\n" + + " \"enabled\": %b,\n" + + " \"address\": {\n" + + " \"name\": \"%s\",\n" + + " \"streetName\": \"%s\",\n" + + " \"streetNumber\": \"%s\",\n" + + " \"city\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"stateCode\": \"%s\",\n" + + " \"zipCode\": \"%s\",\n" + + " \"direction\": \"%s\",\n" + + " \"suite\": \"%s\"\n" + + " }\n" + + "}\n", + givenEnabled, + givenName, + givenStreetName, + givenStreetNumber, + givenCity, + givenCountryCode, + givenStateCode, + givenZipCode, + givenDirection, + givenSuite); + + setUpNoRequestBodyDeleteRequest( + OWNED_NUMBER_EMERGENCY_SERVICE.replace("{numberKey}", givenNumberKey), + Collections.emptyMap(), + givenResponse, + 200); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new CallsEmergencyAddress() + .enabled(givenEnabled) + .address(new CallsAddress() + .name(givenName) + .streetName(givenStreetName) + .streetNumber(givenStreetNumber) + .city(givenCity) + .countryCode(givenCountryCode) + .stateCode(givenStateCode) + .zipCode(givenZipCode) + .direction(givenDirection) + .suite(givenSuite)); + + Consumer assertions = response -> then(response).isEqualTo(expectedResponse); + + var call = api.deleteEmergencyService(givenNumberKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetEmergencyServiceAddressStatus() { + String givenNumberKey = "E9FCDCA496035F08EEA5933702EDF745"; + CallsStatus givenStatus = CallsStatus.PENDING; + String givenReason = "string"; + + String givenResponse = String.format( + "{\n" + + " \"emergencyService\": {\n" + + " \"status\": \"%s\",\n" + + " \"reason\": \"%s\"\n" + + " }\n" + + "}\n", + givenStatus, givenReason); + + setUpSuccessGetRequest( + OWNED_NUMBER_EMERGENCY_SERVICE_STATUS.replace("{numberKey}", givenNumberKey), + Collections.emptyMap(), + givenResponse); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new CallsEmergencyAddressStatus() + .emergencyService( + new NumbersStatusResponse().status(givenStatus).reason(givenReason)); + + Consumer assertions = + response -> then(response).isEqualTo(expectedResponse); + + var call = api.getEmergencyServiceStatus(givenNumberKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateVoiceRecordingConfiguration() { + String givenNumberKey = "2838023A778DFAECDC212708F721B788"; + Boolean givenRecordingEnabled = true; + + String expectedRequest = String.format( + "{\n" + + " \"numberKey\": \"%s\",\n" + + " \"recording\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenNumberKey, givenRecordingEnabled); + + String givenResponse = String.format( + "{\n" + + " \"numberKey\": \"%s\",\n" + + " \"recording\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenNumberKey, givenRecordingEnabled); + + setUpSuccessPutRequest(RECORDING_CONFIGURATION, Collections.emptyMap(), expectedRequest, givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new NumbersNumberConfigurationModel() + .numberKey(givenNumberKey) + .recording(new NumbersRecordingBody().enabled(givenRecordingEnabled)); + + var expectedResponse = new NumbersNumberConfigurationModel() + .numberKey(givenNumberKey) + .recording(new NumbersRecordingBody().enabled(givenRecordingEnabled)); + + Consumer assertions = + response -> then(response).isEqualTo(expectedResponse); + + var call = api.updateRecordingConfiguration(request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCreateVoiceRecordingConfiguration() { + String givenNumberKey = "2838023A778DFAECDC212708F721B788"; + Boolean givenRecordingEnabled = true; + + String expectedRequest = String.format( + "{\n" + + " \"numberKey\": \"%s\",\n" + + " \"recording\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenNumberKey, givenRecordingEnabled); + + String givenResponse = String.format( + "{\n" + + " \"numberKey\": \"%s\",\n" + + " \"recording\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenNumberKey, givenRecordingEnabled); + + setUpSuccessPostRequest(RECORDING_CONFIGURATION, expectedRequest, givenResponse); + + var api = new NumbersApi(getApiClient()); + + var request = new NumbersNumberConfigurationModel() + .numberKey(givenNumberKey) + .recording(new NumbersRecordingBody().enabled(givenRecordingEnabled)); + + var expectedResponse = new NumbersNumberConfigurationModel() + .numberKey(givenNumberKey) + .recording(new NumbersRecordingBody().enabled(givenRecordingEnabled)); + + Consumer assertions = + response -> then(response).isEqualTo(expectedResponse); + + var call = api.createRecordingConfiguration(request); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetVoiceRecordingConfiguration() { + String givenKey = "9A1158154DFA42CADDBD0694A4E9BDC8"; + String givenNumberKey = "2838023A778DFAECDC212708F721B788"; + Boolean givenRecordingEnabled = true; + + String givenResponse = String.format( + "{\n" + + " \"numberKey\": \"%s\",\n" + + " \"recording\": {\n" + + " \"enabled\": %b\n" + + " }\n" + + "}\n", + givenNumberKey, givenRecordingEnabled); + + setUpSuccessGetRequest( + RECORDING_CONFIGURATION_NUMBER.replace("{key}", givenKey), Collections.emptyMap(), givenResponse); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new NumbersNumberConfigurationModel() + .numberKey(givenNumberKey) + .recording(new NumbersRecordingBody().enabled(givenRecordingEnabled)); + + Consumer assertions = + response -> then(response).isEqualTo(expectedResponse); + + var call = api.retrieveRecordingConfiguration(givenKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDeleteVoiceRecordingConfiguration() { + String givenKey = "9A1158154DFA42CADDBD0694A4E9BDC8"; + String givenId = "9A1158154DFA42CADDBD0694A4E9BDC8"; + String givenDownloadUrl = "https://example.com/download"; + String givenExpiresAt = "2024-01-01T00:00:00Z"; + + String givenResponse = "{\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"downloadUrl\": \"" + + givenDownloadUrl + + "\",\n" + + " \"expiresAt\": \"" + + givenExpiresAt + + "\"\n" + + "}\n"; + + setUpNoRequestBodyDeleteRequest( + RECORDING_CONFIGURATION_NUMBER.replace("{key}", givenKey), Collections.emptyMap(), givenResponse, 200); + + var api = new NumbersApi(getApiClient()); + + var expectedResponse = new NumbersDownloadResponseModel() + .id(givenId) + .downloadUrl(givenDownloadUrl) + .expiresAt(givenExpiresAt); + + Consumer assertions = + response -> then(response).isEqualTo(expectedResponse); + + var call = api.removeRecordingConfiguration(givenKey); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetBrands() { + UUID givenId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Examples Warehouse"; + NumbersBrandStage givenStage = NumbersBrandStage.SUBMITTED; + String givenWebsite = "https://www.example.com"; + String givenCreatedDateString = "2021-01-19T16:17:14Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2021-01-19T16:17:14Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + String givenReferenceId = "customer-defined-identifier"; + String givenLegalName = "Examples Warehouse LLC"; + String givenCity = "Seattle"; + String givenState = "WA"; + String givenStreet = "56486 915th Street"; + String givenZipCode = "98061"; + String givenCountryCode = "US"; + String givenAlternateBusinessIdValue = "858020355"; + String givenSupportEmail = "help@example.com"; + String givenSupportPhone = "41785473249"; + NumbersVertical givenVertical = NumbersVertical.RETAIL_AND_CONSUMER_PRODUCTS; + String givenTaxId = "62-4161762"; + String givenTaxIdIssuingCountry = "US"; + NumbersBrandType givenType = NumbersBrandType.PRIVATE_COMPANY; + String givenSort = "createdDate,desc"; + int givenPage = 0; + int givenSize = 20; + int givenTotalPages = 1; + long givenTotalResults = 1L; + + String givenResponse = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"stage\": \"SUBMITTED\",\n" + + " \"website\": \"" + + givenWebsite + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"legalName\": \"" + + givenLegalName + + "\",\n" + + " \"address\": {\n" + + " \"city\": \"" + + givenCity + + "\",\n" + + " \"state\": \"" + + givenState + + "\",\n" + + " \"street\": \"" + + givenStreet + + "\",\n" + + " \"zipCode\": \"" + + givenZipCode + + "\"\n" + + " },\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\",\n" + + " \"alternateBusinessId\": {\n" + + " \"id\": \"" + + givenAlternateBusinessIdValue + + "\",\n" + + " \"type\": \"DUNS\"\n" + + " },\n" + + " \"supportEmail\": \"" + + givenSupportEmail + + "\",\n" + + " \"supportPhone\": \"" + + givenSupportPhone + + "\",\n" + + " \"vertical\": \"RETAIL_AND_CONSUMER_PRODUCTS\",\n" + + " \"taxId\": \"" + + givenTaxId + + "\",\n" + + " \"taxIdIssuingCountry\": \"" + + givenTaxIdIssuingCountry + + "\",\n" + + " \"type\": \"TENDLC_PRIVATE_COMPANY\"\n" + + " }\n" + + " ],\n" + + " \"paging\": {\n" + + " \"page\": " + + givenPage + + ",\n" + + " \"size\": " + + givenSize + + ",\n" + + " \"totalPages\": " + + givenTotalPages + + ",\n" + + " \"totalResults\": " + + givenTotalResults + + "\n" + + " }\n" + + "}\n"; + + setUpSuccessGetRequest(BRANDS, Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getBrands().sort(List.of(givenSort)); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getPaging()).isNotNull(); + then(response.getPaging().getPage()).isEqualTo(givenPage); + then(response.getPaging().getSize()).isEqualTo(givenSize); + then(response.getPaging().getTotalPages()).isEqualTo(givenTotalPages); + then(response.getPaging().getTotalResults()).isEqualTo(givenTotalResults); + then(response.getResults()).isNotNull(); + then(response.getResults().size()).isEqualTo(1); + + NumbersBrand brand = response.getResults().get(0); + then(brand.getClass()).isEqualTo(NumbersPrivateCompanyBrand.class); + then(brand.getId()).isEqualTo(givenId); + then(brand.getApplicationId()).isEqualTo(givenApplicationId); + then(brand.getEntityId()).isEqualTo(givenEntityId); + then(brand.getName()).isEqualTo(givenName); + then(brand.getStage()).isEqualTo(givenStage); + then(brand.getWebsite()).isEqualTo(givenWebsite); + then(brand.getCreatedDate()).isEqualTo(givenCreatedDate); + then(brand.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(brand.getType()).isEqualTo(givenType); + + NumbersPrivateCompanyBrand privateBrand = (NumbersPrivateCompanyBrand) brand; + then(privateBrand.getReferenceId()).isEqualTo(givenReferenceId); + then(privateBrand.getLegalName()).isEqualTo(givenLegalName); + then(privateBrand.getCountryCode()).isEqualTo(givenCountryCode); + then(privateBrand.getSupportEmail()).isEqualTo(givenSupportEmail); + then(privateBrand.getSupportPhone()).isEqualTo(givenSupportPhone); + then(privateBrand.getVertical()).isEqualTo(givenVertical); + then(privateBrand.getTaxId()).isEqualTo(givenTaxId); + then(privateBrand.getTaxIdIssuingCountry()).isEqualTo(givenTaxIdIssuingCountry); + + NumbersAddress address = privateBrand.getAddress(); + then(address).isNotNull(); + then(address.getCity()).isEqualTo(givenCity); + then(address.getState()).isEqualTo(givenState); + then(address.getStreet()).isEqualTo(givenStreet); + then(address.getZipCode()).isEqualTo(givenZipCode); + + NumbersBusinessIdentifier alternateBusinessId = privateBrand.getAlternateBusinessId(); + then(alternateBusinessId).isNotNull(); + then(alternateBusinessId.getClass()).isEqualTo(NumbersDataUniversalNumberingSystemNumber.class); + then(alternateBusinessId.getId()).isEqualTo(givenAlternateBusinessIdValue); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCreateBrand() { + UUID givenId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Non Profit Company"; + NumbersBrandStage givenStage = NumbersBrandStage.SUBMITTED; + String givenWebsite = "https://www.example.com"; + String givenCreatedDateString = "2021-01-19T16:17:14Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2021-01-19T16:17:14Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + String givenReferenceId = "customer-defined-identifier"; + String givenLegalName = "Examples Warehouse LLC"; + String givenCity = "Seattle"; + String givenState = "WA"; + String givenStreet = "56486 915th Street"; + String givenZipCode = "98061"; + String givenCountryCode = "US"; + String givenAlternateBusinessIdValue = "590900O3Z29E78HVXT56"; + String givenSupportEmail = "help@example.com"; + String givenSupportPhone = "41785473249"; + NumbersVertical givenVertical = NumbersVertical.NON_PROFIT_ORGANIZATION; + String givenTaxId = "62-4161762"; + String givenTaxIdIssuingCountry = "US"; + NumbersBrandType givenType = NumbersBrandType.NON_PROFIT; + + String givenRequest = "{\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"website\": \"" + + givenWebsite + + "\",\n" + + " \"type\": \"TENDLC_NON_PROFIT\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"legalName\": \"" + + givenLegalName + + "\",\n" + + " \"address\": {\n" + + " \"city\": \"" + + givenCity + + "\",\n" + + " \"state\": \"" + + givenState + + "\",\n" + + " \"street\": \"" + + givenStreet + + "\",\n" + + " \"zipCode\": \"" + + givenZipCode + + "\"\n" + + " },\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\",\n" + + " \"alternateBusinessId\": {\n" + + " \"id\": \"" + + givenAlternateBusinessIdValue + + "\",\n" + + " \"type\": \"LEI\"\n" + + " },\n" + + " \"supportEmail\": \"" + + givenSupportEmail + + "\",\n" + + " \"supportPhone\": \"" + + givenSupportPhone + + "\",\n" + + " \"vertical\": \"NON_PROFIT_ORGANIZATION\",\n" + + " \"taxId\": \"" + + givenTaxId + + "\",\n" + + " \"taxIdIssuingCountry\": \"" + + givenTaxIdIssuingCountry + + "\"\n" + + "}\n"; + + String givenResponse = "{\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"stage\": \"SUBMITTED\",\n" + + " \"website\": \"" + + givenWebsite + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"legalName\": \"" + + givenLegalName + + "\",\n" + + " \"address\": {\n" + + " \"city\": \"" + + givenCity + + "\",\n" + + " \"state\": \"" + + givenState + + "\",\n" + + " \"street\": \"" + + givenStreet + + "\",\n" + + " \"zipCode\": \"" + + givenZipCode + + "\"\n" + + " },\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\",\n" + + " \"alternateBusinessId\": {\n" + + " \"id\": \"" + + givenAlternateBusinessIdValue + + "\",\n" + + " \"type\": \"LEI\"\n" + + " },\n" + + " \"supportEmail\": \"" + + givenSupportEmail + + "\",\n" + + " \"supportPhone\": \"" + + givenSupportPhone + + "\",\n" + + " \"vertical\": \"NON_PROFIT_ORGANIZATION\",\n" + + " \"taxId\": \"" + + givenTaxId + + "\",\n" + + " \"taxIdIssuingCountry\": \"" + + givenTaxIdIssuingCountry + + "\",\n" + + " \"type\": \"TENDLC_NON_PROFIT\"\n" + + "}\n"; + + setUpPostRequest(BRANDS, givenRequest, givenResponse, 201); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersNonProfitBrand() + .referenceId(givenReferenceId) + .legalName(givenLegalName) + .address(new NumbersAddress() + .city(givenCity) + .state(givenState) + .street(givenStreet) + .zipCode(givenZipCode)) + .countryCode(givenCountryCode) + .alternateBusinessId(new NumbersLegalEntityIdentifier().id(givenAlternateBusinessIdValue)) + .supportEmail(givenSupportEmail) + .supportPhone(givenSupportPhone) + .vertical(givenVertical) + .taxId(givenTaxId) + .taxIdIssuingCountry(givenTaxIdIssuingCountry); + request.name(givenName); + request.applicationId(givenApplicationId); + request.entityId(givenEntityId); + request.website(givenWebsite); + + var call = api.createBrand(request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getClass()).isEqualTo(NumbersNonProfitBrand.class); + then(response.getId()).isEqualTo(givenId); + then(response.getApplicationId()).isEqualTo(givenApplicationId); + then(response.getEntityId()).isEqualTo(givenEntityId); + then(response.getName()).isEqualTo(givenName); + then(response.getStage()).isEqualTo(givenStage); + then(response.getWebsite()).isEqualTo(givenWebsite); + then(response.getCreatedDate()).isEqualTo(givenCreatedDate); + then(response.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(response.getType()).isEqualTo(givenType); + + NumbersNonProfitBrand nonProfitBrand = (NumbersNonProfitBrand) response; + then(nonProfitBrand.getReferenceId()).isEqualTo(givenReferenceId); + then(nonProfitBrand.getLegalName()).isEqualTo(givenLegalName); + then(nonProfitBrand.getCountryCode()).isEqualTo(givenCountryCode); + then(nonProfitBrand.getSupportEmail()).isEqualTo(givenSupportEmail); + then(nonProfitBrand.getSupportPhone()).isEqualTo(givenSupportPhone); + then(nonProfitBrand.getVertical()).isEqualTo(givenVertical); + then(nonProfitBrand.getTaxId()).isEqualTo(givenTaxId); + then(nonProfitBrand.getTaxIdIssuingCountry()).isEqualTo(givenTaxIdIssuingCountry); + + NumbersAddress address = nonProfitBrand.getAddress(); + then(address).isNotNull(); + then(address.getCity()).isEqualTo(givenCity); + then(address.getState()).isEqualTo(givenState); + then(address.getStreet()).isEqualTo(givenStreet); + then(address.getZipCode()).isEqualTo(givenZipCode); + + NumbersBusinessIdentifier alternateBusinessId = nonProfitBrand.getAlternateBusinessId(); + then(alternateBusinessId).isNotNull(); + then(alternateBusinessId.getClass()).isEqualTo(NumbersLegalEntityIdentifier.class); + then(alternateBusinessId.getId()).isEqualTo(givenAlternateBusinessIdValue); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetBrand() { + UUID givenId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Non Profit Company"; + NumbersBrandStage givenStage = NumbersBrandStage.SUBMITTED; + String givenWebsite = "https://www.example.com"; + String givenCreatedDateString = "2021-01-19T16:17:14Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2021-01-19T16:17:14Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + String givenReferenceId = "customer-defined-identifier"; + String givenLegalName = "Examples Warehouse LLC"; + String givenCity = "Seattle"; + String givenState = "WA"; + String givenStreet = "56486 915th Street"; + String givenZipCode = "98061"; + String givenCountryCode = "US"; + String givenAlternateBusinessIdValue = "590900O3Z29E78HVXT56"; + String givenSupportEmail = "help@example.com"; + String givenSupportPhone = "41785473249"; + NumbersVertical givenVertical = NumbersVertical.NON_PROFIT_ORGANIZATION; + String givenTaxId = "62-4161762"; + String givenTaxIdIssuingCountry = "US"; + NumbersBrandType givenType = NumbersBrandType.NON_PROFIT; + + String givenResponse = "{\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"stage\": \"SUBMITTED\",\n" + + " \"website\": \"" + + givenWebsite + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"legalName\": \"" + + givenLegalName + + "\",\n" + + " \"address\": {\n" + + " \"city\": \"" + + givenCity + + "\",\n" + + " \"state\": \"" + + givenState + + "\",\n" + + " \"street\": \"" + + givenStreet + + "\",\n" + + " \"zipCode\": \"" + + givenZipCode + + "\"\n" + + " },\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\",\n" + + " \"alternateBusinessId\": {\n" + + " \"id\": \"" + + givenAlternateBusinessIdValue + + "\",\n" + + " \"type\": \"LEI\"\n" + + " },\n" + + " \"supportEmail\": \"" + + givenSupportEmail + + "\",\n" + + " \"supportPhone\": \"" + + givenSupportPhone + + "\",\n" + + " \"vertical\": \"NON_PROFIT_ORGANIZATION\",\n" + + " \"taxId\": \"" + + givenTaxId + + "\",\n" + + " \"taxIdIssuingCountry\": \"" + + givenTaxIdIssuingCountry + + "\",\n" + + " \"type\": \"TENDLC_NON_PROFIT\"\n" + + "}\n"; + + setUpSuccessGetRequest(BRAND.replace("{brandId}", givenId.toString()), Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getBrand(givenId); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getClass()).isEqualTo(NumbersNonProfitBrand.class); + then(response.getId()).isEqualTo(givenId); + then(response.getApplicationId()).isEqualTo(givenApplicationId); + then(response.getEntityId()).isEqualTo(givenEntityId); + then(response.getName()).isEqualTo(givenName); + then(response.getStage()).isEqualTo(givenStage); + then(response.getWebsite()).isEqualTo(givenWebsite); + then(response.getCreatedDate()).isEqualTo(givenCreatedDate); + then(response.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(response.getType()).isEqualTo(givenType); + + NumbersNonProfitBrand nonProfitBrand = (NumbersNonProfitBrand) response; + then(nonProfitBrand.getReferenceId()).isEqualTo(givenReferenceId); + then(nonProfitBrand.getLegalName()).isEqualTo(givenLegalName); + then(nonProfitBrand.getCountryCode()).isEqualTo(givenCountryCode); + then(nonProfitBrand.getSupportEmail()).isEqualTo(givenSupportEmail); + then(nonProfitBrand.getSupportPhone()).isEqualTo(givenSupportPhone); + then(nonProfitBrand.getVertical()).isEqualTo(givenVertical); + then(nonProfitBrand.getTaxId()).isEqualTo(givenTaxId); + then(nonProfitBrand.getTaxIdIssuingCountry()).isEqualTo(givenTaxIdIssuingCountry); + + NumbersAddress address = nonProfitBrand.getAddress(); + then(address).isNotNull(); + then(address.getCity()).isEqualTo(givenCity); + then(address.getState()).isEqualTo(givenState); + then(address.getStreet()).isEqualTo(givenStreet); + then(address.getZipCode()).isEqualTo(givenZipCode); + + NumbersBusinessIdentifier alternateBusinessId = nonProfitBrand.getAlternateBusinessId(); + then(alternateBusinessId).isNotNull(); + then(alternateBusinessId.getClass()).isEqualTo(NumbersLegalEntityIdentifier.class); + then(alternateBusinessId.getId()).isEqualTo(givenAlternateBusinessIdValue); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateBrand() { + UUID givenId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Non Profit Company"; + NumbersBrandStage givenStage = NumbersBrandStage.SUBMITTED; + String givenWebsite = "https://www.example.com"; + String givenCreatedDateString = "2021-01-19T16:17:14Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2021-01-19T16:17:14Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + String givenReferenceId = "customer-defined-identifier"; + String givenLegalName = "Examples Warehouse LLC"; + String givenCity = "Seattle"; + String givenState = "WA"; + String givenStreet = "56486 915th Street"; + String givenZipCode = "98061"; + String givenCountryCode = "US"; + String givenAlternateBusinessIdValue = "590900O3Z29E78HVXT56"; + String givenSupportEmail = "help@example.com"; + String givenSupportPhone = "41785473249"; + NumbersVertical givenVertical = NumbersVertical.NON_PROFIT_ORGANIZATION; + String givenTaxId = "62-4161762"; + String givenTaxIdIssuingCountry = "US"; + NumbersBrandType givenType = NumbersBrandType.NON_PROFIT; + + String givenRequest = "{\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"website\": \"" + + givenWebsite + + "\",\n" + + " \"type\": \"TENDLC_NON_PROFIT\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"legalName\": \"" + + givenLegalName + + "\",\n" + + " \"address\": {\n" + + " \"city\": \"" + + givenCity + + "\",\n" + + " \"state\": \"" + + givenState + + "\",\n" + + " \"street\": \"" + + givenStreet + + "\",\n" + + " \"zipCode\": \"" + + givenZipCode + + "\"\n" + + " },\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\",\n" + + " \"alternateBusinessId\": {\n" + + " \"id\": \"" + + givenAlternateBusinessIdValue + + "\",\n" + + " \"type\": \"LEI\"\n" + + " },\n" + + " \"supportEmail\": \"" + + givenSupportEmail + + "\",\n" + + " \"supportPhone\": \"" + + givenSupportPhone + + "\",\n" + + " \"vertical\": \"NON_PROFIT_ORGANIZATION\",\n" + + " \"taxId\": \"" + + givenTaxId + + "\",\n" + + " \"taxIdIssuingCountry\": \"" + + givenTaxIdIssuingCountry + + "\"\n" + + "}\n"; + + String givenResponse = "{\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"stage\": \"SUBMITTED\",\n" + + " \"website\": \"" + + givenWebsite + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"legalName\": \"" + + givenLegalName + + "\",\n" + + " \"address\": {\n" + + " \"city\": \"" + + givenCity + + "\",\n" + + " \"state\": \"" + + givenState + + "\",\n" + + " \"street\": \"" + + givenStreet + + "\",\n" + + " \"zipCode\": \"" + + givenZipCode + + "\"\n" + + " },\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\",\n" + + " \"alternateBusinessId\": {\n" + + " \"id\": \"" + + givenAlternateBusinessIdValue + + "\",\n" + + " \"type\": \"LEI\"\n" + + " },\n" + + " \"supportEmail\": \"" + + givenSupportEmail + + "\",\n" + + " \"supportPhone\": \"" + + givenSupportPhone + + "\",\n" + + " \"vertical\": \"NON_PROFIT_ORGANIZATION\",\n" + + " \"taxId\": \"" + + givenTaxId + + "\",\n" + + " \"taxIdIssuingCountry\": \"" + + givenTaxIdIssuingCountry + + "\",\n" + + " \"type\": \"TENDLC_NON_PROFIT\"\n" + + "}\n"; + + setUpSuccessPutRequest(BRAND.replace("{brandId}", givenId.toString()), Map.of(), givenRequest, givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersNonProfitBrand() + .referenceId(givenReferenceId) + .legalName(givenLegalName) + .address(new NumbersAddress() + .city(givenCity) + .state(givenState) + .street(givenStreet) + .zipCode(givenZipCode)) + .countryCode(givenCountryCode) + .alternateBusinessId(new NumbersLegalEntityIdentifier().id(givenAlternateBusinessIdValue)) + .supportEmail(givenSupportEmail) + .supportPhone(givenSupportPhone) + .vertical(givenVertical) + .taxId(givenTaxId) + .taxIdIssuingCountry(givenTaxIdIssuingCountry); + request.name(givenName); + request.applicationId(givenApplicationId); + request.entityId(givenEntityId); + request.website(givenWebsite); + + var call = api.updateBrand(givenId, request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getClass()).isEqualTo(NumbersNonProfitBrand.class); + then(response.getId()).isEqualTo(givenId); + then(response.getApplicationId()).isEqualTo(givenApplicationId); + then(response.getEntityId()).isEqualTo(givenEntityId); + then(response.getName()).isEqualTo(givenName); + then(response.getStage()).isEqualTo(givenStage); + then(response.getWebsite()).isEqualTo(givenWebsite); + then(response.getCreatedDate()).isEqualTo(givenCreatedDate); + then(response.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(response.getType()).isEqualTo(givenType); + + NumbersNonProfitBrand nonProfitBrand = (NumbersNonProfitBrand) response; + then(nonProfitBrand.getReferenceId()).isEqualTo(givenReferenceId); + then(nonProfitBrand.getLegalName()).isEqualTo(givenLegalName); + then(nonProfitBrand.getCountryCode()).isEqualTo(givenCountryCode); + then(nonProfitBrand.getSupportEmail()).isEqualTo(givenSupportEmail); + then(nonProfitBrand.getSupportPhone()).isEqualTo(givenSupportPhone); + then(nonProfitBrand.getVertical()).isEqualTo(givenVertical); + then(nonProfitBrand.getTaxId()).isEqualTo(givenTaxId); + then(nonProfitBrand.getTaxIdIssuingCountry()).isEqualTo(givenTaxIdIssuingCountry); + + NumbersAddress address = nonProfitBrand.getAddress(); + then(address).isNotNull(); + then(address.getCity()).isEqualTo(givenCity); + then(address.getState()).isEqualTo(givenState); + then(address.getStreet()).isEqualTo(givenStreet); + then(address.getZipCode()).isEqualTo(givenZipCode); + + NumbersBusinessIdentifier alternateBusinessId = nonProfitBrand.getAlternateBusinessId(); + then(alternateBusinessId).isNotNull(); + then(alternateBusinessId.getClass()).isEqualTo(NumbersLegalEntityIdentifier.class); + then(alternateBusinessId.getId()).isEqualTo(givenAlternateBusinessIdValue); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDeleteBrand() { + UUID givenBrandId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + + setUpNoResponseBodyDeleteRequest(BRAND.replace("{brandId}", givenBrandId.toString()), Map.of(), 204); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.deleteBrand(givenBrandId); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldRegisterBrand() { + UUID givenBrandId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + + setUpNoBodyPostRequest(REGISTER_BRAND.replace("{brandId}", givenBrandId.toString()), Map.of(), 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.registerBrand(givenBrandId); + testSuccessfulCallWithNoBody(call::executeAsync, 202); + } + + @Test + void shouldGetBrandRegistrarStatuses() { + UUID givenBrandId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + NumbersBrandRegistrar givenRegistrar = NumbersBrandRegistrar.CAMPAIGN_REGISTRY; + NumbersBrandRegistrationStatusPublic givenState = NumbersBrandRegistrationStatusPublic.REJECTED; + NumbersBrandStatus.BrandIdentityStatusEnum givenBrandIdentityStatus = + NumbersBrandStatus.BrandIdentityStatusEnum.UNVERIFIED; + NumbersBrandStatus.BrandAuthenticationStatusEnum givenBrandAuthenticationStatus = + NumbersBrandStatus.BrandAuthenticationStatusEnum.PENDING; + String givenRejectionReason = "Invalid country code."; + + String givenResponse = "[\n" + + " {\n" + + " \"registrar\": \"CAMPAIGN_REGISTRY\",\n" + + " \"state\": \"REJECTED\",\n" + + " \"brandIdentityStatus\": \"UNVERIFIED\",\n" + + " \"brandAuthenticationStatus\": \"PENDING\",\n" + + " \"rejectionReason\": \"" + + givenRejectionReason + + "\"\n" + + " }\n" + + "]\n"; + + setUpSuccessGetRequest( + BRAND_REGISTRAR_STATUSES.replace("{brandId}", givenBrandId.toString()), Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getBrandRegistrarStatuses(givenBrandId); + + Consumer> assertions = response -> { + then(response).isNotNull(); + then(response.size()).isEqualTo(1); + + NumbersBrandStatus status = response.get(0); + then(status.getRegistrar()).isEqualTo(givenRegistrar); + then(status.getState()).isEqualTo(givenState); + then(status.getBrandIdentityStatus()).isEqualTo(givenBrandIdentityStatus); + then(status.getBrandAuthenticationStatus()).isEqualTo(givenBrandAuthenticationStatus); + then(status.getRejectionReason()).isEqualTo(givenRejectionReason); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldRequestBrandAuthVerification() { + UUID givenBrandId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + + setUpNoBodyPostRequest(BRAND_AUTH_VERIFICATION.replace("{brandId}", givenBrandId.toString()), Map.of(), 204); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.brandAuthVerification(givenBrandId); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldResend2faMailBrandAuth() { + UUID givenBrandId = UUID.fromString("79ff0424-7201-45ca-bcbe-9989535fa2ec"); + + setUpNoBodyPostRequest(BRAND_RESEND_2FA.replace("{brandId}", givenBrandId.toString()), Map.of(), 204); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.resend2faMailBrandAuth(givenBrandId); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + // WEBHOOKS + private final JSON json = new JSON(); + + @Test + void shouldReceiveBrandStatusUpdate() { + UUID givenBrandId = UUID.fromString("0579c038-55f2-11ee-9458-325096b39f47"); + String givenReceivedAtString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenReceivedAt = OffsetDateTime.parse(givenReceivedAtString); + NumbersWebhookBrandRegistrationStatus givenBrandStatus = NumbersWebhookBrandRegistrationStatus.FAILURE; + String givenRejectionReason = "Tax id does not match with the company name or business type."; + String givenApplicationId = "application-id"; + String givenEntityId = "entity-id"; + + String givenRequest = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"event\": \"BRAND_STATUS_UPDATE\",\n" + + " \"receivedAt\": \"" + + givenReceivedAtString + + "\",\n" + + " \"content\": {\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"brandStatus\": \"FAILURE\",\n" + + " \"rejectionReasons\": [\n" + + " \"" + + givenRejectionReason + + "\"\n" + + " ]\n" + + " },\n" + + " \"platform\": {\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\"\n" + + " }\n" + + " }\n" + + " ]\n" + + "}\n"; + + NumbersBrandRegistrationWebhookResponse requestBody = + json.deserialize(givenRequest, NumbersBrandRegistrationWebhookResponse.class); + + then(requestBody).isNotNull(); + then(requestBody.getResults()).isNotNull(); + then(requestBody.getResults().size()).isEqualTo(1); + + NumbersBrandRegistrationWebhookMessage message = + requestBody.getResults().get(0); + then(message.getEvent()).isEqualTo(NumbersBrandRegistrationWebhookMessage.EventEnum.BRAND_STATUS_UPDATE); + then(message.getReceivedAt()).isEqualTo(givenReceivedAt); + then(message.getPlatform()).isNotNull(); + then(message.getPlatform().getApplicationId()).isEqualTo(givenApplicationId); + then(message.getPlatform().getEntityId()).isEqualTo(givenEntityId); + + NumbersBrandRegistrationWebhookContent content = message.getContent(); + then(content).isNotNull(); + then(content.getBrandId()).isEqualTo(givenBrandId); + then(content.getBrandStatus()).isEqualTo(givenBrandStatus); + then(content.getRejectionReasons()).isNotNull(); + then(content.getRejectionReasons().size()).isEqualTo(1); + then(content.getRejectionReasons().get(0)).isEqualTo(givenRejectionReason); + } + + @Test + void shouldReceiveBrandAuth2faUpdate() { + UUID givenBrandId = UUID.fromString("0579c038-55f2-11ee-9458-325096b39f47"); + String givenReceivedAtString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenReceivedAt = OffsetDateTime.parse(givenReceivedAtString); + NumbersBrandAuthUpdateWebhookContent.BrandAuthUpdateEnum givenBrandAuthUpdate = + NumbersBrandAuthUpdateWebhookContent.BrandAuthUpdateEnum.SEND; + String givenApplicationId = "application-id"; + String givenEntityId = "entity-id"; + + String givenRequest = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"event\": \"BRAND_AUTH_UPDATE\",\n" + + " \"receivedAt\": \"" + + givenReceivedAtString + + "\",\n" + + " \"content\": {\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"brandAuthUpdate\": \"BRAND_EMAIL_2FA_SEND\"\n" + + " },\n" + + " \"platform\": {\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\"\n" + + " }\n" + + " }\n" + + " ]\n" + + "}\n"; + + NumbersBrandAuthUpdateWebhookResponse requestBody = + json.deserialize(givenRequest, NumbersBrandAuthUpdateWebhookResponse.class); + + then(requestBody).isNotNull(); + then(requestBody.getResults()).isNotNull(); + then(requestBody.getResults().size()).isEqualTo(1); + + NumbersBrandAuthUpdateWebhookMessage message = requestBody.getResults().get(0); + then(message.getEvent()).isEqualTo(NumbersBrandAuthUpdateWebhookMessage.EventEnum.BRAND_AUTH_UPDATE); + then(message.getReceivedAt()).isEqualTo(givenReceivedAt); + then(message.getPlatform()).isNotNull(); + then(message.getPlatform().getApplicationId()).isEqualTo(givenApplicationId); + then(message.getPlatform().getEntityId()).isEqualTo(givenEntityId); + + NumbersBrandAuthUpdateWebhookContent content = message.getContent(); + then(content).isNotNull(); + then(content.getBrandId()).isEqualTo(givenBrandId); + then(content.getBrandAuthUpdate()).isEqualTo(givenBrandAuthUpdate); + } + + @Test + void shouldGetBrandVets() { + UUID givenBrandId = UUID.fromString("0e9bcbb3-096e-49f9-aeea-7a13a201eff5"); + UUID givenVetId = UUID.fromString("ff189fb0-ad19-4670-b3e8-9afb5de5695d"); + Integer givenScore = 0; + String givenVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenVettedDate = OffsetDateTime.parse(givenVettedDateString); + String givenEnhancedVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenEnhancedVettedDate = OffsetDateTime.parse(givenEnhancedVettedDateString); + NumbersBrandVetStatus givenStatus = NumbersBrandVetStatus.PENDING; + NumbersVettingType givenType = NumbersVettingType.STANDARD; + Boolean givenImported = true; + NumbersVettingProvider givenImportedVetProvider = NumbersVettingProvider.AEGIS_MOBILE; + String givenSort = "vettedDate,desc"; + int givenPage = 0; + int givenSize = 1; + int givenTotalPages = 0; + long givenTotalResults = 0L; + + String givenResponse = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"vetId\": \"" + + givenVetId + + "\",\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"score\": " + + givenScore + + ",\n" + + " \"vettedDate\": \"" + + givenVettedDateString + + "\",\n" + + " \"enhancedVettedDate\": \"" + + givenEnhancedVettedDateString + + "\",\n" + + " \"status\": \"PENDING\",\n" + + " \"type\": \"STANDARD\",\n" + + " \"imported\": true,\n" + + " \"importedVetProvider\": \"AEGIS_MOBILE\"\n" + + " }\n" + + " ],\n" + + " \"paging\": {\n" + + " \"page\": " + + givenPage + + ",\n" + + " \"size\": " + + givenSize + + ",\n" + + " \"totalPages\": " + + givenTotalPages + + ",\n" + + " \"totalResults\": " + + givenTotalResults + + "\n" + + " }\n" + + "}\n"; + + setUpSuccessGetRequest(BRAND_VETS.replace("{brandId}", givenBrandId.toString()), Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getBrandVets(givenBrandId).sort(List.of(givenSort)); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getPaging()).isNotNull(); + then(response.getPaging().getPage()).isEqualTo(givenPage); + then(response.getPaging().getSize()).isEqualTo(givenSize); + then(response.getPaging().getTotalPages()).isEqualTo(givenTotalPages); + then(response.getPaging().getTotalResults()).isEqualTo(givenTotalResults); + then(response.getResults()).isNotNull(); + then(response.getResults().size()).isEqualTo(1); + + NumbersBrandVet vet = response.getResults().get(0); + then(vet.getVetId()).isEqualTo(givenVetId); + then(vet.getBrandId()).isEqualTo(givenBrandId); + then(vet.getScore()).isEqualTo(givenScore); + then(vet.getVettedDate()).isEqualTo(givenVettedDate); + then(vet.getEnhancedVettedDate()).isEqualTo(givenEnhancedVettedDate); + then(vet.getStatus()).isEqualTo(givenStatus); + then(vet.getType()).isEqualTo(givenType); + then(vet.getImported()).isEqualTo(givenImported); + then(vet.getImportedVetProvider()).isEqualTo(givenImportedVetProvider); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldVetBrand() { + UUID givenBrandId = UUID.fromString("0e9bcbb3-096e-49f9-aeea-7a13a201eff5"); + UUID givenVetId = UUID.fromString("ff189fb0-ad19-4670-b3e8-9afb5de5695d"); + Integer givenScore = 0; + String givenVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenVettedDate = OffsetDateTime.parse(givenVettedDateString); + String givenVettedDateSerialized = "2019-08-24T14:15:22.000+0000"; + String givenEnhancedVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenEnhancedVettedDate = OffsetDateTime.parse(givenEnhancedVettedDateString); + String givenEnhancedVettedDateSerialized = "2019-08-24T14:15:22.000+0000"; + NumbersBrandVetStatus givenStatus = NumbersBrandVetStatus.PENDING; + NumbersVettingType givenType = NumbersVettingType.STANDARD; + Boolean givenImported = true; + NumbersVettingProvider givenImportedVetProvider = NumbersVettingProvider.AEGIS_MOBILE; + + String givenRequest = "{\n" + + " \"vetId\": \"" + + givenVetId + + "\",\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"score\": " + + givenScore + + ",\n" + + " \"vettedDate\": \"" + + givenVettedDateSerialized + + "\",\n" + + " \"enhancedVettedDate\": \"" + + givenEnhancedVettedDateSerialized + + "\",\n" + + " \"status\": \"PENDING\",\n" + + " \"type\": \"STANDARD\",\n" + + " \"imported\": true,\n" + + " \"importedVetProvider\": \"AEGIS_MOBILE\"\n" + + "}\n"; + + String givenResponse = "{\n" + + " \"vetId\": \"" + + givenVetId + + "\",\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"score\": " + + givenScore + + ",\n" + + " \"vettedDate\": \"" + + givenVettedDateString + + "\",\n" + + " \"enhancedVettedDate\": \"" + + givenEnhancedVettedDateString + + "\",\n" + + " \"status\": \"PENDING\",\n" + + " \"type\": \"STANDARD\",\n" + + " \"imported\": true,\n" + + " \"importedVetProvider\": \"AEGIS_MOBILE\"\n" + + "}\n"; + + setUpPostRequest(BRAND_VETS.replace("{brandId}", givenBrandId.toString()), givenRequest, givenResponse, 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersBrandVet() + .vetId(givenVetId) + .brandId(givenBrandId) + .score(givenScore) + .vettedDate(givenVettedDate) + .enhancedVettedDate(givenEnhancedVettedDate) + .status(givenStatus) + .type(givenType) + .imported(givenImported) + .importedVetProvider(givenImportedVetProvider); + + var call = api.vetBrand(givenBrandId, request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getVetId()).isEqualTo(givenVetId); + then(response.getBrandId()).isEqualTo(givenBrandId); + then(response.getScore()).isEqualTo(givenScore); + then(response.getVettedDate()).isEqualTo(givenVettedDate); + then(response.getEnhancedVettedDate()).isEqualTo(givenEnhancedVettedDate); + then(response.getStatus()).isEqualTo(givenStatus); + then(response.getType()).isEqualTo(givenType); + then(response.getImported()).isEqualTo(givenImported); + then(response.getImportedVetProvider()).isEqualTo(givenImportedVetProvider); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetBrandVet() { + UUID givenBrandId = UUID.fromString("0e9bcbb3-096e-49f9-aeea-7a13a201eff5"); + UUID givenVetId = UUID.fromString("ff189fb0-ad19-4670-b3e8-9afb5de5695d"); + Integer givenScore = 0; + String givenVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenVettedDate = OffsetDateTime.parse(givenVettedDateString); + String givenEnhancedVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenEnhancedVettedDate = OffsetDateTime.parse(givenEnhancedVettedDateString); + NumbersBrandVetStatus givenStatus = NumbersBrandVetStatus.PENDING; + NumbersVettingType givenType = NumbersVettingType.STANDARD; + Boolean givenImported = true; + NumbersVettingProvider givenImportedVetProvider = NumbersVettingProvider.AEGIS_MOBILE; + + String givenResponse = "{\n" + + " \"vetId\": \"" + + givenVetId + + "\",\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"score\": " + + givenScore + + ",\n" + + " \"vettedDate\": \"" + + givenVettedDateString + + "\",\n" + + " \"enhancedVettedDate\": \"" + + givenEnhancedVettedDateString + + "\",\n" + + " \"status\": \"PENDING\",\n" + + " \"type\": \"STANDARD\",\n" + + " \"imported\": true,\n" + + " \"importedVetProvider\": \"AEGIS_MOBILE\"\n" + + "}\n"; + + setUpSuccessGetRequest( + BRAND_VET.replace("{brandId}", givenBrandId.toString()).replace("{vetId}", givenVetId.toString()), + Map.of(), + givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getBrandVet(givenBrandId, givenVetId); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getVetId()).isEqualTo(givenVetId); + then(response.getBrandId()).isEqualTo(givenBrandId); + then(response.getScore()).isEqualTo(givenScore); + then(response.getVettedDate()).isEqualTo(givenVettedDate); + then(response.getEnhancedVettedDate()).isEqualTo(givenEnhancedVettedDate); + then(response.getStatus()).isEqualTo(givenStatus); + then(response.getType()).isEqualTo(givenType); + then(response.getImported()).isEqualTo(givenImported); + then(response.getImportedVetProvider()).isEqualTo(givenImportedVetProvider); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateBrandVet() { + UUID givenBrandId = UUID.fromString("0e9bcbb3-096e-49f9-aeea-7a13a201eff5"); + UUID givenVetId = UUID.fromString("ff189fb0-ad19-4670-b3e8-9afb5de5695d"); + Integer givenScore = 0; + String givenVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenVettedDate = OffsetDateTime.parse(givenVettedDateString); + String givenVettedDateSerialized = "2019-08-24T14:15:22.000+0000"; + String givenEnhancedVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenEnhancedVettedDate = OffsetDateTime.parse(givenEnhancedVettedDateString); + String givenEnhancedVettedDateSerialized = "2019-08-24T14:15:22.000+0000"; + NumbersBrandVetStatus givenStatus = NumbersBrandVetStatus.PENDING; + NumbersVettingType givenType = NumbersVettingType.STANDARD; + Boolean givenImported = true; + NumbersVettingProvider givenImportedVetProvider = NumbersVettingProvider.AEGIS_MOBILE; + + String givenRequest = "{\n" + + " \"vetId\": \"" + + givenVetId + + "\",\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"score\": " + + givenScore + + ",\n" + + " \"vettedDate\": \"" + + givenVettedDateSerialized + + "\",\n" + + " \"enhancedVettedDate\": \"" + + givenEnhancedVettedDateSerialized + + "\",\n" + + " \"status\": \"PENDING\",\n" + + " \"type\": \"STANDARD\",\n" + + " \"imported\": true,\n" + + " \"importedVetProvider\": \"AEGIS_MOBILE\"\n" + + "}\n"; + + String givenResponse = "{\n" + + " \"vetId\": \"" + + givenVetId + + "\",\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"score\": " + + givenScore + + ",\n" + + " \"vettedDate\": \"" + + givenVettedDateString + + "\",\n" + + " \"enhancedVettedDate\": \"" + + givenEnhancedVettedDateString + + "\",\n" + + " \"status\": \"PENDING\",\n" + + " \"type\": \"STANDARD\",\n" + + " \"imported\": true,\n" + + " \"importedVetProvider\": \"AEGIS_MOBILE\"\n" + + "}\n"; + + setUpSuccessPutRequest( + BRAND_VET.replace("{brandId}", givenBrandId.toString()).replace("{vetId}", givenVetId.toString()), + Map.of(), + givenRequest, + givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersBrandVet() + .vetId(givenVetId) + .brandId(givenBrandId) + .score(givenScore) + .vettedDate(givenVettedDate) + .enhancedVettedDate(givenEnhancedVettedDate) + .status(givenStatus) + .type(givenType) + .imported(givenImported) + .importedVetProvider(givenImportedVetProvider); + + var call = api.updateBrandVet(givenBrandId, givenVetId, request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getVetId()).isEqualTo(givenVetId); + then(response.getBrandId()).isEqualTo(givenBrandId); + then(response.getScore()).isEqualTo(givenScore); + then(response.getVettedDate()).isEqualTo(givenVettedDate); + then(response.getEnhancedVettedDate()).isEqualTo(givenEnhancedVettedDate); + then(response.getStatus()).isEqualTo(givenStatus); + then(response.getType()).isEqualTo(givenType); + then(response.getImported()).isEqualTo(givenImported); + then(response.getImportedVetProvider()).isEqualTo(givenImportedVetProvider); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldImportExistingBrandVet() { + UUID givenBrandId = UUID.fromString("0e9bcbb3-096e-49f9-aeea-7a13a201eff5"); + UUID givenVetId = UUID.fromString("ff189fb0-ad19-4670-b3e8-9afb5de5695d"); + String givenExternalVetId = "string"; + String givenVettingToken = "string"; + Integer givenScore = 0; + String givenVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenVettedDate = OffsetDateTime.parse(givenVettedDateString); + String givenEnhancedVettedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenEnhancedVettedDate = OffsetDateTime.parse(givenEnhancedVettedDateString); + NumbersBrandVetStatus givenStatus = NumbersBrandVetStatus.PENDING; + NumbersVettingType givenType = NumbersVettingType.STANDARD; + Boolean givenImported = true; + NumbersVettingProvider givenImportedVetProvider = NumbersVettingProvider.AEGIS_MOBILE; + + String givenRequest = "{\n" + + " \"type\": \"AEGIS_MOBILE\",\n" + + " \"externalVetId\": \"" + + givenExternalVetId + + "\",\n" + + " \"vettingToken\": \"" + + givenVettingToken + + "\"\n" + + "}\n"; + + String givenResponse = "{\n" + + " \"vetId\": \"" + + givenVetId + + "\",\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"score\": " + + givenScore + + ",\n" + + " \"vettedDate\": \"" + + givenVettedDateString + + "\",\n" + + " \"enhancedVettedDate\": \"" + + givenEnhancedVettedDateString + + "\",\n" + + " \"status\": \"PENDING\",\n" + + " \"type\": \"STANDARD\",\n" + + " \"imported\": true,\n" + + " \"importedVetProvider\": \"AEGIS_MOBILE\"\n" + + "}\n"; + + setUpSuccessPutRequest( + BRAND_VET_IMPORT.replace("{brandId}", givenBrandId.toString()), Map.of(), givenRequest, givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersAegisVetImportRequest() + .externalVetId(givenExternalVetId) + .vettingToken(givenVettingToken); + + var call = api.importExistingBrandVet(givenBrandId, request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getVetId()).isEqualTo(givenVetId); + then(response.getBrandId()).isEqualTo(givenBrandId); + then(response.getScore()).isEqualTo(givenScore); + then(response.getVettedDate()).isEqualTo(givenVettedDate); + then(response.getEnhancedVettedDate()).isEqualTo(givenEnhancedVettedDate); + then(response.getStatus()).isEqualTo(givenStatus); + then(response.getType()).isEqualTo(givenType); + then(response.getImported()).isEqualTo(givenImported); + then(response.getImportedVetProvider()).isEqualTo(givenImportedVetProvider); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetBrandEnhancedVetReport() { + UUID givenBrandId = UUID.fromString("0e9bcbb3-096e-49f9-aeea-7a13a201eff5"); + UUID givenVetId = UUID.fromString("ff189fb0-ad19-4670-b3e8-9afb5de5695d"); + String givenFileContent = "Test vet report content"; + + setUpGetRequestOctet( + BRAND_VET_REPORT + .replace("{brandId}", givenBrandId.toString()) + .replace("{vetId}", givenVetId.toString()), + Map.of(), + givenFileContent, + 200); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getBrandEnhancedVetReport(givenBrandId, givenVetId); + testSuccessfulCallWithFileResult(call::execute); + } + + @Test + void shouldReceiveBrandVetUpdate() { + UUID givenVetId = UUID.fromString("20ef4b12-55f2-11ee-bfc2-325096b39f47"); + UUID givenBrandId = UUID.fromString("0579c038-55f2-11ee-9458-325096b39f47"); + String givenReceivedAtString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenReceivedAt = OffsetDateTime.parse(givenReceivedAtString); + Integer givenVettingScore = 80; + NumbersWebhookBrandVetStatus givenBrandVettingStatus = NumbersWebhookBrandVetStatus.SUCCESS; + NumbersWebhookBrandVettingType givenVetType = NumbersWebhookBrandVettingType.STANDARD; + String givenApplicationId = "application-id"; + String givenEntityId = "entity-id"; + + String givenRequest = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"event\": \"BRAND_VET_UPDATE\",\n" + + " \"receivedAt\": \"" + + givenReceivedAtString + + "\",\n" + + " \"content\": {\n" + + " \"vetId\": \"" + + givenVetId + + "\",\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"vettingScore\": " + + givenVettingScore + + ",\n" + + " \"brandVettingStatus\": \"SUCCESS\",\n" + + " \"vetType\": \"STANDARD\"\n" + + " },\n" + + " \"platform\": {\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\"\n" + + " }\n" + + " }\n" + + " ]\n" + + "}\n"; + + NumbersBrandVetStatusWebhookResponse requestBody = + json.deserialize(givenRequest, NumbersBrandVetStatusWebhookResponse.class); + + then(requestBody).isNotNull(); + then(requestBody.getResults()).isNotNull(); + then(requestBody.getResults().size()).isEqualTo(1); + + NumbersBrandVetStatusWebhookMessage message = requestBody.getResults().get(0); + then(message.getEvent()).isEqualTo(NumbersBrandVetStatusWebhookMessage.EventEnum.BRAND_VET_UPDATE); + then(message.getReceivedAt()).isEqualTo(givenReceivedAt); + then(message.getPlatform()).isNotNull(); + then(message.getPlatform().getApplicationId()).isEqualTo(givenApplicationId); + then(message.getPlatform().getEntityId()).isEqualTo(givenEntityId); + + NumbersBrandVetStatusWebhookContent content = message.getContent(); + then(content).isNotNull(); + then(content.getVetId()).isEqualTo(givenVetId); + then(content.getBrandId()).isEqualTo(givenBrandId); + then(content.getVettingScore()).isEqualTo(givenVettingScore); + then(content.getBrandVettingStatus()).isEqualTo(givenBrandVettingStatus); + then(content.getVetType()).isEqualTo(givenVetType); + } + + @Test + void shouldGetCampaigns() { + UUID givenId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenReferenceId = "customer-defined-identifier"; + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Promo"; + String givenCreatedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + NumbersCampaignStage givenStage = NumbersCampaignStage.DRAFT; + UUID givenPriorityId = UUID.fromString("46de4f63-390c-4253-9869-da282096691b"); + String givenPrioritySubmittedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenPrioritySubmittedDate = OffsetDateTime.parse(givenPrioritySubmittedDateString); + UUID givenBrandId = UUID.fromString("a0c63335-f841-4d43-9ef8-e0765a233f29"); + String givenProgramSummary = "A mix of promotional and informational messaging."; + String givenCustomerCareEmail = "examples@example.com"; + String givenConfirmationMessage = + "Example promotional-marketing. Msg&data rates may apply. Reply HELP for help, STOP to cancel."; + String givenExampleMessage = "Come in today and get 10% OFF today!"; + String givenHelpMessage = + "Example promotional-marketing: Help at textsupport@example.com or 18889997777. Msg&data rates may apply. Reply STOP to cancel."; + String givenStopMessage = + "Example promotional-marketing: You have been unsubscribed, no more messages will be sent."; + String givenTermsAndConditionsUrl = "https://www.example.com/terms-and-conditions"; + String givenOptInCallToAction = "Text MESSAGE to subscribe"; + String givenOptInKeyword = "MESSAGE"; + String givenBrandPreviewBrandId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + String givenBrandPreviewBrandName = "Examples Warehouse"; + String givenCustomerCarePhone = "41785473249"; + Boolean givenLowVolume = false; + NumbersTenDlcUseCase givenUseCase1 = NumbersTenDlcUseCase.PROMOTIONAL_MARKETING; + NumbersTenDlcUseCase givenUseCase2 = NumbersTenDlcUseCase.EDUCATION; + String givenNumberKey = "2C958BA98F9EBACA4F9357D81BFBF47B"; + String givenNumber = "41793026727"; + String givenCountryCode = "US"; + Boolean givenAgeGated = true; + Boolean givenDirectLending = false; + Boolean givenEmbeddedLink = true; + Boolean givenEmbeddedPhone = false; + NumbersCampaignType givenType = NumbersCampaignType.TEN_DIGIT_LONG_CODE; + String givenRejectionReason1 = "Example rejection reason 1"; + String givenRejectionReason2 = "Example rejection reason 2"; + String givenRejectionDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenRejectionDate = OffsetDateTime.parse(givenRejectionDateString); + String givenAppealReason = "Example appeal reason"; + String givenAppealDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenAppealDate = OffsetDateTime.parse(givenAppealDateString); + int givenPage = 0; + int givenSize = 20; + int givenTotalPages = 1; + long givenTotalResults = 1L; + String givenSort = "createdDate,desc"; + + String givenResponse = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"stage\": \"DRAFT\",\n" + + " \"priority\": {\n" + + " \"priorityId\": \"" + + givenPriorityId + + "\",\n" + + " \"submittedDate\": \"" + + givenPrioritySubmittedDateString + + "\"\n" + + " },\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"programSummary\": \"" + + givenProgramSummary + + "\",\n" + + " \"customerCareEmail\": \"" + + givenCustomerCareEmail + + "\",\n" + + " \"confirmationMessage\": \"" + + givenConfirmationMessage + + "\",\n" + + " \"exampleMessages\": [\n" + + " \"" + + givenExampleMessage + + "\"\n" + + " ],\n" + + " \"helpMessage\": \"" + + givenHelpMessage + + "\",\n" + + " \"stopMessage\": \"" + + givenStopMessage + + "\",\n" + + " \"messageTypes\": [\n" + + " \"SMS\",\n" + + " \"MMS\"\n" + + " ],\n" + + " \"termsAndConditionsUrl\": \"" + + givenTermsAndConditionsUrl + + "\",\n" + + " \"optIns\": {\n" + + " \"keyword\": {\n" + + " \"callToAction\": \"" + + givenOptInCallToAction + + "\",\n" + + " \"keywords\": [\n" + + " \"" + + givenOptInKeyword + + "\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"brandPreview\": {\n" + + " \"brandId\": \"" + + givenBrandPreviewBrandId + + "\",\n" + + " \"brandName\": \"" + + givenBrandPreviewBrandName + + "\"\n" + + " },\n" + + " \"customerCarePhone\": \"" + + givenCustomerCarePhone + + "\",\n" + + " \"lowVolume\": false,\n" + + " \"useCase\": null,\n" + + " \"useCases\": [\n" + + " \"PROMOTIONAL_MARKETING\",\n" + + " \"EDUCATION\"\n" + + " ],\n" + + " \"numberKeys\": [\n" + + " \"" + + givenNumberKey + + "\"\n" + + " ],\n" + + " \"numberPreviews\": [\n" + + " {\n" + + " \"numberKey\": \"" + + givenNumberKey + + "\",\n" + + " \"number\": \"" + + givenNumber + + "\",\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\"\n" + + " }\n" + + " ],\n" + + " \"ageGated\": true,\n" + + " \"directLending\": false,\n" + + " \"embeddedLink\": true,\n" + + " \"embeddedPhone\": false,\n" + + " \"type\": \"TEN_DIGIT_LONG_CODE\",\n" + + " \"campaignFeedback\": {\n" + + " \"rejectionReasons\": [\n" + + " \"" + + givenRejectionReason1 + + "\",\n" + + " \"" + + givenRejectionReason2 + + "\"\n" + + " ],\n" + + " \"rejectionDate\": \"" + + givenRejectionDateString + + "\"\n" + + " },\n" + + " \"appealData\": {\n" + + " \"appealReason\": \"" + + givenAppealReason + + "\",\n" + + " \"appealDate\": \"" + + givenAppealDateString + + "\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"paging\": {\n" + + " \"page\": " + + givenPage + + ",\n" + + " \"size\": " + + givenSize + + ",\n" + + " \"totalPages\": " + + givenTotalPages + + ",\n" + + " \"totalResults\": " + + givenTotalResults + + "\n" + + " }\n" + + "}\n"; + + setUpSuccessGetRequest(CAMPAIGNS, Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getCampaigns().sort(List.of(givenSort)); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getPaging()).isNotNull(); + then(response.getPaging().getPage()).isEqualTo(givenPage); + then(response.getPaging().getSize()).isEqualTo(givenSize); + then(response.getPaging().getTotalPages()).isEqualTo(givenTotalPages); + then(response.getPaging().getTotalResults()).isEqualTo(givenTotalResults); + then(response.getResults()).isNotNull(); + then(response.getResults().size()).isEqualTo(1); + + NumbersCampaign campaign = response.getResults().get(0); + then(campaign).isNotNull(); + then(campaign.getClass()).isEqualTo(NumbersTenDlcCampaign.class); + then(campaign.getId()).isEqualTo(givenId); + then(campaign.getApplicationId()).isEqualTo(givenApplicationId); + then(campaign.getEntityId()).isEqualTo(givenEntityId); + then(campaign.getName()).isEqualTo(givenName); + then(campaign.getCreatedDate()).isEqualTo(givenCreatedDate); + then(campaign.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(campaign.getStage()).isEqualTo(givenStage); + then(campaign.getType()).isEqualTo(givenType); + + NumbersPriorityInfo priority = campaign.getPriority(); + then(priority).isNotNull(); + then(priority.getPriorityId()).isEqualTo(givenPriorityId); + then(priority.getSubmittedDate()).isEqualTo(givenPrioritySubmittedDate); + + NumbersCampaignFeedback feedback = campaign.getCampaignFeedback(); + then(feedback).isNotNull(); + then(feedback.getRejectionReasons()).containsExactly(givenRejectionReason1, givenRejectionReason2); + then(feedback.getRejectionDate()).isEqualTo(givenRejectionDate); + + NumbersTenDlcCampaign tenDlcCampaign = (NumbersTenDlcCampaign) campaign; + then(tenDlcCampaign.getBrandId()).isEqualTo(givenBrandId); + then(tenDlcCampaign.getProgramSummary()).isEqualTo(givenProgramSummary); + then(tenDlcCampaign.getCustomerCareEmail()).isEqualTo(givenCustomerCareEmail); + then(tenDlcCampaign.getConfirmationMessage()).isEqualTo(givenConfirmationMessage); + then(tenDlcCampaign.getExampleMessages()).containsExactly(givenExampleMessage); + then(tenDlcCampaign.getHelpMessage()).isEqualTo(givenHelpMessage); + then(tenDlcCampaign.getStopMessage()).isEqualTo(givenStopMessage); + then(tenDlcCampaign.getTermsAndConditionsUrl()).isEqualTo(givenTermsAndConditionsUrl); + then(tenDlcCampaign.getCustomerCarePhone()).isEqualTo(givenCustomerCarePhone); + then(tenDlcCampaign.getLowVolume()).isEqualTo(givenLowVolume); + then(tenDlcCampaign.getUseCases()).containsExactlyInAnyOrder(givenUseCase1, givenUseCase2); + then(tenDlcCampaign.getAgeGated()).isEqualTo(givenAgeGated); + then(tenDlcCampaign.getDirectLending()).isEqualTo(givenDirectLending); + then(tenDlcCampaign.getEmbeddedLink()).isEqualTo(givenEmbeddedLink); + then(tenDlcCampaign.getEmbeddedPhone()).isEqualTo(givenEmbeddedPhone); + then(tenDlcCampaign.getNumberKeys()).containsExactly(givenNumberKey); + + NumbersOptIns optIns = tenDlcCampaign.getOptIns(); + then(optIns).isNotNull(); + then(optIns.getKeyword()).isNotNull(); + then(optIns.getKeyword().getCallToAction()).isEqualTo(givenOptInCallToAction); + then(optIns.getKeyword().getKeywords()).containsExactly(givenOptInKeyword); + + NumbersBrandPreview brandPreview = tenDlcCampaign.getBrandPreview(); + then(brandPreview).isNotNull(); + then(brandPreview.getBrandId()).isEqualTo(givenBrandPreviewBrandId); + then(brandPreview.getBrandName()).isEqualTo(givenBrandPreviewBrandName); + + then(tenDlcCampaign.getNumberPreviews()).isNotNull(); + then(tenDlcCampaign.getNumberPreviews().size()).isEqualTo(1); + NumbersNumberPreview numberPreview = + tenDlcCampaign.getNumberPreviews().iterator().next(); + then(numberPreview.getNumberKey()).isEqualTo(givenNumberKey); + then(numberPreview.getNumber()).isEqualTo(givenNumber); + then(numberPreview.getCountryCode()).isEqualTo(givenCountryCode); + + NumbersAppealData appealData = tenDlcCampaign.getAppealData(); + then(appealData).isNotNull(); + then(appealData.getAppealReason()).isEqualTo(givenAppealReason); + then(appealData.getAppealDate()).isEqualTo(givenAppealDate); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCreateCampaign() { + UUID givenId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenReferenceId = "customer-defined-identifier"; + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Promo"; + String givenNumber = "41785473249"; + UUID givenBrandId = UUID.fromString("a0c63335-f841-4d43-9ef8-e0765a233f29"); + String givenConfirmationMessage = + "Example promotional-marketing. Msg&data rates may apply. Reply HELP for help, STOP to cancel."; + String givenCustomerCarePhone = "41785473249"; + String givenCustomerCareEmail = "examples@example.com"; + String givenExampleMessage = "Come in today and get 10% OFF today!"; + String givenHelpMessage = + "Example promotional-marketing: Help at textsupport@example.com or 18889997777. Msg&data rates may apply. Reply STOP to cancel."; + Boolean givenLowVolume = false; + String givenProgramSummary = "A mix of promotional and informational messaging."; + String givenStopMessage = + "Example promotional-marketing: You have been unsubscribed, no more messages will be sent."; + String givenTermsAndConditionsUrl = "https://www.example.com/terms-and-conditions"; + NumbersTenDlcUseCase givenUseCase1 = NumbersTenDlcUseCase.PROMOTIONAL_MARKETING; + NumbersTenDlcUseCase givenUseCase2 = NumbersTenDlcUseCase.EDUCATION; + String givenOptInCallToAction = + "Text MESSAGE to subscribe to recurring promotional marketing alerts. Msg&DataRates may apply. Text HELP for help, STOP to opt out. Terms and PP https://www.example.om/terms-of-service/"; + String givenOptInKeyword = "MESSAGE"; + Boolean givenAgeGated = true; + Boolean givenDirectLending = false; + Boolean givenEmbeddedLink = true; + Boolean givenEmbeddedPhone = false; + String givenCreatedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + NumbersCampaignStage givenStage = NumbersCampaignStage.DRAFT; + UUID givenPriorityId = UUID.fromString("46de4f63-390c-4253-9869-da282096691b"); + String givenPrioritySubmittedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenPrioritySubmittedDate = OffsetDateTime.parse(givenPrioritySubmittedDateString); + String givenBrandPreviewBrandId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + String givenBrandPreviewBrandName = "Examples Warehouse"; + String givenNumberKey = "2C958BA98F9EBACA4F9357D81BFBF47B"; + String givenNumberPreviewNumber = "41793026727"; + String givenCountryCode = "US"; + String givenRejectionReason1 = + "Campaign appears to be for an age-gated content type but age gate attribute is not selected."; + String givenRejectionReason2 = "This is a custom rejection reason provided by a reviewer."; + String givenRejectionErrorCode1 = "1001"; + String givenRejectionDescription1 = + "Campaign appears to be for an age-gated content type but age gate attribute is not selected."; + String givenRejectionRecommendedAction1 = + "Verify if the Age Gate attribute is selected for the campaign registration. If the campaign is not related to age-gated content, update the campaign description."; + String givenRejectionErrorCode2 = "9999"; + String givenRejectionDescription2 = "This is a custom rejection reason provided by a reviewer."; + String givenRejectionDateString = "2019-08-23T14:15:22Z"; + OffsetDateTime givenRejectionDate = OffsetDateTime.parse(givenRejectionDateString); + String givenAppealReason = "Example appeal reason"; + String givenAppealDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenAppealDate = OffsetDateTime.parse(givenAppealDateString); + NumbersCampaignType givenType = NumbersCampaignType.TEN_DIGIT_LONG_CODE; + + String givenRequest = "{\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"type\": \"TEN_DIGIT_LONG_CODE\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"numbers\": [\n" + + " \"" + + givenNumber + + "\"\n" + + " ],\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"confirmationMessage\": \"" + + givenConfirmationMessage + + "\",\n" + + " \"customerCarePhone\": \"" + + givenCustomerCarePhone + + "\",\n" + + " \"customerCareEmail\": \"" + + givenCustomerCareEmail + + "\",\n" + + " \"exampleMessages\": [\n" + + " \"" + + givenExampleMessage + + "\"\n" + + " ],\n" + + " \"helpMessage\": \"" + + givenHelpMessage + + "\",\n" + + " \"lowVolume\": false,\n" + + " \"messageTypes\": [\n" + + " \"SMS\",\n" + + " \"MMS\"\n" + + " ],\n" + + " \"programSummary\": \"" + + givenProgramSummary + + "\",\n" + + " \"stopMessage\": \"" + + givenStopMessage + + "\",\n" + + " \"termsAndConditionsUrl\": \"" + + givenTermsAndConditionsUrl + + "\",\n" + + " \"useCases\": [\n" + + " \"PROMOTIONAL_MARKETING\",\n" + + " \"EDUCATION\"\n" + + " ],\n" + + " \"optIns\": {\n" + + " \"keyword\": {\n" + + " \"callToAction\": \"" + + givenOptInCallToAction + + "\",\n" + + " \"keywords\": [\n" + + " \"" + + givenOptInKeyword + + "\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"ageGated\": true,\n" + + " \"directLending\": false,\n" + + " \"embeddedLink\": true,\n" + + " \"embeddedPhone\": false\n" + + "}\n"; + + String givenResponse = "{\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"stage\": \"DRAFT\",\n" + + " \"priority\": {\n" + + " \"priorityId\": \"" + + givenPriorityId + + "\",\n" + + " \"submittedDate\": \"" + + givenPrioritySubmittedDateString + + "\"\n" + + " },\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"programSummary\": \"" + + givenProgramSummary + + "\",\n" + + " \"customerCareEmail\": \"" + + givenCustomerCareEmail + + "\",\n" + + " \"confirmationMessage\": \"" + + givenConfirmationMessage + + "\",\n" + + " \"exampleMessages\": [\n" + + " \"" + + givenExampleMessage + + "\"\n" + + " ],\n" + + " \"helpMessage\": \"" + + givenHelpMessage + + "\",\n" + + " \"stopMessage\": \"" + + givenStopMessage + + "\",\n" + + " \"messageTypes\": [\n" + + " \"SMS\",\n" + + " \"MMS\"\n" + + " ],\n" + + " \"termsAndConditionsUrl\": \"" + + givenTermsAndConditionsUrl + + "\",\n" + + " \"optIns\": {\n" + + " \"keyword\": {\n" + + " \"callToAction\": \"" + + givenOptInCallToAction + + "\",\n" + + " \"keywords\": [\n" + + " \"" + + givenOptInKeyword + + "\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"brandPreview\": {\n" + + " \"brandId\": \"" + + givenBrandPreviewBrandId + + "\",\n" + + " \"brandName\": \"" + + givenBrandPreviewBrandName + + "\"\n" + + " },\n" + + " \"customerCarePhone\": \"" + + givenCustomerCarePhone + + "\",\n" + + " \"lowVolume\": false,\n" + + " \"useCase\": null,\n" + + " \"useCases\": [\n" + + " \"PROMOTIONAL_MARKETING\",\n" + + " \"EDUCATION\"\n" + + " ],\n" + + " \"numberKeys\": [\n" + + " \"" + + givenNumberKey + + "\"\n" + + " ],\n" + + " \"numberPreviews\": [\n" + + " {\n" + + " \"numberKey\": \"" + + givenNumberKey + + "\",\n" + + " \"number\": \"" + + givenNumberPreviewNumber + + "\",\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\"\n" + + " }\n" + + " ],\n" + + " \"ageGated\": true,\n" + + " \"directLending\": false,\n" + + " \"embeddedLink\": true,\n" + + " \"embeddedPhone\": false,\n" + + " \"type\": \"TEN_DIGIT_LONG_CODE\",\n" + + " \"campaignFeedback\": {\n" + + " \"rejectionReasons\": [\n" + + " \"" + + givenRejectionReason1 + + "\",\n" + + " \"" + + givenRejectionReason2 + + "\"\n" + + " ],\n" + + " \"rejectionDetails\": [\n" + + " {\n" + + " \"errorCode\": \"" + + givenRejectionErrorCode1 + + "\",\n" + + " \"description\": \"" + + givenRejectionDescription1 + + "\",\n" + + " \"recommendedAction\": \"" + + givenRejectionRecommendedAction1 + + "\"\n" + + " },\n" + + " {\n" + + " \"errorCode\": \"" + + givenRejectionErrorCode2 + + "\",\n" + + " \"description\": \"" + + givenRejectionDescription2 + + "\",\n" + + " \"recommendedAction\": null\n" + + " }\n" + + " ],\n" + + " \"rejectionDate\": \"" + + givenRejectionDateString + + "\"\n" + + " },\n" + + " \"appealData\": {\n" + + " \"appealReason\": \"" + + givenAppealReason + + "\",\n" + + " \"appealDate\": \"" + + givenAppealDateString + + "\"\n" + + " }\n" + + "}\n"; + + setUpPostRequest(CAMPAIGNS, givenRequest, givenResponse, 201); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersTenDlcCampaign() + .brandId(givenBrandId) + .numbers(new java.util.LinkedHashSet<>(List.of(givenNumber))) + .programSummary(givenProgramSummary) + .confirmationMessage(givenConfirmationMessage) + .exampleMessages(List.of(givenExampleMessage)) + .helpMessage(givenHelpMessage) + .stopMessage(givenStopMessage) + .messageTypes(new java.util.LinkedHashSet<>(List.of(NumbersMessageType.SMS, NumbersMessageType.MMS))) + .termsAndConditionsUrl(givenTermsAndConditionsUrl) + .optIns(new NumbersOptIns() + .keyword(new NumbersKeywordOptIn() + .callToAction(givenOptInCallToAction) + .addKeywordsItem(givenOptInKeyword))) + .ageGated(givenAgeGated) + .customerCarePhone(givenCustomerCarePhone) + .lowVolume(givenLowVolume) + .useCases(new java.util.LinkedHashSet<>(List.of(givenUseCase1, givenUseCase2))) + .directLending(givenDirectLending) + .embeddedLink(givenEmbeddedLink) + .embeddedPhone(givenEmbeddedPhone) + .customerCareEmail(givenCustomerCareEmail); + request.referenceId(givenReferenceId); + request.applicationId(givenApplicationId); + request.entityId(givenEntityId); + request.name(givenName); + + var call = api.createCampaign(request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getClass()).isEqualTo(NumbersTenDlcCampaign.class); + then(response.getId()).isEqualTo(givenId); + then(response.getApplicationId()).isEqualTo(givenApplicationId); + then(response.getEntityId()).isEqualTo(givenEntityId); + then(response.getName()).isEqualTo(givenName); + then(response.getCreatedDate()).isEqualTo(givenCreatedDate); + then(response.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(response.getStage()).isEqualTo(givenStage); + then(response.getType()).isEqualTo(givenType); + + NumbersPriorityInfo priority = response.getPriority(); + then(priority).isNotNull(); + then(priority.getPriorityId()).isEqualTo(givenPriorityId); + then(priority.getSubmittedDate()).isEqualTo(givenPrioritySubmittedDate); + + NumbersCampaignFeedback feedback = response.getCampaignFeedback(); + then(feedback).isNotNull(); + then(feedback.getRejectionReasons()).containsExactly(givenRejectionReason1, givenRejectionReason2); + then(feedback.getRejectionDate()).isEqualTo(givenRejectionDate); + then(feedback.getRejectionDetails()).isNotNull(); + then(feedback.getRejectionDetails().size()).isEqualTo(2); + NumbersRejectionReason detail1 = feedback.getRejectionDetails().get(0); + then(detail1.getErrorCode()).isEqualTo(givenRejectionErrorCode1); + then(detail1.getDescription()).isEqualTo(givenRejectionDescription1); + then(detail1.getRecommendedAction()).isEqualTo(givenRejectionRecommendedAction1); + NumbersRejectionReason detail2 = feedback.getRejectionDetails().get(1); + then(detail2.getErrorCode()).isEqualTo(givenRejectionErrorCode2); + then(detail2.getDescription()).isEqualTo(givenRejectionDescription2); + then(detail2.getRecommendedAction()).isNull(); + + NumbersTenDlcCampaign tenDlcCampaign = (NumbersTenDlcCampaign) response; + then(tenDlcCampaign.getBrandId()).isEqualTo(givenBrandId); + then(tenDlcCampaign.getProgramSummary()).isEqualTo(givenProgramSummary); + then(tenDlcCampaign.getCustomerCareEmail()).isEqualTo(givenCustomerCareEmail); + then(tenDlcCampaign.getConfirmationMessage()).isEqualTo(givenConfirmationMessage); + then(tenDlcCampaign.getExampleMessages()).containsExactly(givenExampleMessage); + then(tenDlcCampaign.getHelpMessage()).isEqualTo(givenHelpMessage); + then(tenDlcCampaign.getStopMessage()).isEqualTo(givenStopMessage); + then(tenDlcCampaign.getTermsAndConditionsUrl()).isEqualTo(givenTermsAndConditionsUrl); + then(tenDlcCampaign.getCustomerCarePhone()).isEqualTo(givenCustomerCarePhone); + then(tenDlcCampaign.getLowVolume()).isEqualTo(givenLowVolume); + then(tenDlcCampaign.getUseCases()).containsExactlyInAnyOrder(givenUseCase1, givenUseCase2); + then(tenDlcCampaign.getAgeGated()).isEqualTo(givenAgeGated); + then(tenDlcCampaign.getDirectLending()).isEqualTo(givenDirectLending); + then(tenDlcCampaign.getEmbeddedLink()).isEqualTo(givenEmbeddedLink); + then(tenDlcCampaign.getEmbeddedPhone()).isEqualTo(givenEmbeddedPhone); + then(tenDlcCampaign.getNumberKeys()).containsExactly(givenNumberKey); + + NumbersOptIns optIns = tenDlcCampaign.getOptIns(); + then(optIns).isNotNull(); + then(optIns.getKeyword()).isNotNull(); + then(optIns.getKeyword().getCallToAction()).isEqualTo(givenOptInCallToAction); + then(optIns.getKeyword().getKeywords()).containsExactly(givenOptInKeyword); + + NumbersBrandPreview brandPreview = tenDlcCampaign.getBrandPreview(); + then(brandPreview).isNotNull(); + then(brandPreview.getBrandId()).isEqualTo(givenBrandPreviewBrandId); + then(brandPreview.getBrandName()).isEqualTo(givenBrandPreviewBrandName); + + then(tenDlcCampaign.getNumberPreviews()).isNotNull(); + then(tenDlcCampaign.getNumberPreviews().size()).isEqualTo(1); + NumbersNumberPreview numberPreview = + tenDlcCampaign.getNumberPreviews().iterator().next(); + then(numberPreview.getNumberKey()).isEqualTo(givenNumberKey); + then(numberPreview.getNumber()).isEqualTo(givenNumberPreviewNumber); + then(numberPreview.getCountryCode()).isEqualTo(givenCountryCode); + + NumbersAppealData appealData = tenDlcCampaign.getAppealData(); + then(appealData).isNotNull(); + then(appealData.getAppealReason()).isEqualTo(givenAppealReason); + then(appealData.getAppealDate()).isEqualTo(givenAppealDate); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCreateTollFreeCampaign() { + String givenReferenceId = "customer-defined-identifier"; + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Promo"; + String givenNumber = "18007321000"; + String givenExampleMessage = "Come in today and get 10% OFF today!"; + String givenProgramSummary = "A mix of promotional and informational messaging."; + String givenTermsAndConditionsUrl = "https://www.example.com/terms-and-conditions"; + String givenPrivacyPolicyUrl = "https://www.example.com/privacy-policy"; + NumbersTollFreeUseCase givenUseCase = NumbersTollFreeUseCase.APP_NOTIFICATIONS; + String givenOptInCallToAction = "Text MESSAGE to subscribe"; + String givenOptInKeyword = "MESSAGE"; + NumbersTollFreeMessageVolume givenMessageVolume = NumbersTollFreeMessageVolume.HUNDRED; + String givenOptInImageUrl = "https://www.example.com/terms-and-conditions"; + String givenAdditionalInformation = "Example additional information"; + String givenCustomerCareEmail = "examples@example.com"; + String givenCountryCode = "US"; + String givenCity = "Seattle"; + String givenState = "WA"; + String givenStreet = "56486 915th Street"; + String givenZipCode = "98061"; + String givenSupportPhone = "1234567890"; + String givenSupportEmail = "example@example.com"; + String givenBusinessContactFirstName = "First Name"; + String givenBusinessContactLastName = "Last Name"; + String givenBusinessDba = "Example DBA name"; + String givenBusinessName = "Example business name"; + String givenLegalName = "Example legal name"; + String givenBusinessWebsite = "https://www.example.com"; + String givenTaxId = "62-4161762"; + String givenTaxIdIssuingCountry = "US"; + NumbersTollFreeUnifiedNumberCampaignApiModel.LegalEntityTypeEnum givenLegalEntityType = + NumbersTollFreeUnifiedNumberCampaignApiModel.LegalEntityTypeEnum.PRIVATE_COMPANY; + NumbersBusinessRegistrationType givenBusinessRegistrationType = NumbersBusinessRegistrationType.EIN; + UUID givenId = UUID.fromString("2e13b58f-e8d1-45a1-bc67-efc834e2b146"); + String givenResponseName = "Example toll free unified number campaign"; + String givenCreatedDateString = "2025-06-30T15:38:40Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2025-06-30T15:38:41Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + NumbersCampaignStage givenStage = NumbersCampaignStage.SUBMITTED_FOR_REVIEW; + String givenPrioritySubmittedDateString = "2025-06-30T15:38:41Z"; + OffsetDateTime givenPrioritySubmittedDate = OffsetDateTime.parse(givenPrioritySubmittedDateString); + String givenNumberKey = "8CE2738191F7F06F84E5417579D41D74"; + String givenNumberPreviewNumber = "18007321000"; + String givenNumberPreviewCountryCode = "UF"; + String givenResponseOptInImageUrl = "https://www.example.com"; + String givenResponseSupportEmail = "email@example.com"; + String givenResponseBusinessDba = "Example Business DBA"; + String givenResponseBusinessName = "Example Business Name"; + String givenResponseCustomerCareEmail = "customercare@example.com"; + NumbersTollFreeUnifiedNumberCampaignApiModel.TypeEnum givenType = + NumbersTollFreeUnifiedNumberCampaignApiModel.TypeEnum.TOLL_FREE_UNIFIED_NUMBER; + + String givenRequest = "{\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"type\": \"TOLL_FREE_UNIFIED_NUMBER\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"numbers\": [\n" + + " \"" + + givenNumber + + "\"\n" + + " ],\n" + + " \"numberKeys\": [],\n" + + " \"exampleMessage\": \"" + + givenExampleMessage + + "\",\n" + + " \"programSummary\": \"" + + givenProgramSummary + + "\",\n" + + " \"termsAndConditionsUrl\": \"" + + givenTermsAndConditionsUrl + + "\",\n" + + " \"privacyPolicyUrl\": \"" + + givenPrivacyPolicyUrl + + "\",\n" + + " \"useCase\": \"APP_NOTIFICATIONS\",\n" + + " \"optIns\": {\n" + + " \"keyword\": {\n" + + " \"callToAction\": \"" + + givenOptInCallToAction + + "\",\n" + + " \"keywords\": [\n" + + " \"" + + givenOptInKeyword + + "\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"messageVolume\": \"HUNDRED\",\n" + + " \"optInImageURLs\": [\n" + + " \"" + + givenOptInImageUrl + + "\"\n" + + " ],\n" + + " \"additionalInformation\": \"" + + givenAdditionalInformation + + "\",\n" + + " \"customerCareEmail\": \"" + + givenCustomerCareEmail + + "\",\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\",\n" + + " \"address\": {\n" + + " \"city\": \"" + + givenCity + + "\",\n" + + " \"state\": \"" + + givenState + + "\",\n" + + " \"street\": \"" + + givenStreet + + "\",\n" + + " \"zipCode\": \"" + + givenZipCode + + "\"\n" + + " },\n" + + " \"supportPhone\": \"" + + givenSupportPhone + + "\",\n" + + " \"supportEmail\": \"" + + givenSupportEmail + + "\",\n" + + " \"businessContactFirstName\": \"" + + givenBusinessContactFirstName + + "\",\n" + + " \"businessContactLastName\": \"" + + givenBusinessContactLastName + + "\",\n" + + " \"businessDBA\": \"" + + givenBusinessDba + + "\",\n" + + " \"businessName\": \"" + + givenBusinessName + + "\",\n" + + " \"legalName\": \"" + + givenLegalName + + "\",\n" + + " \"businessWebsite\": \"" + + givenBusinessWebsite + + "\",\n" + + " \"taxId\": \"" + + givenTaxId + + "\",\n" + + " \"taxIdIssuingCountry\": \"" + + givenTaxIdIssuingCountry + + "\",\n" + + " \"legalEntityType\": \"PRIVATE_COMPANY\",\n" + + " \"businessRegistrationType\": \"EIN\"\n" + + "}\n"; + + String givenResponse = "{\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenResponseName + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"stage\": \"SUBMITTED_FOR_REVIEW\",\n" + + " \"priority\": {\n" + + " \"priorityId\": null,\n" + + " \"submittedDate\": \"" + + givenPrioritySubmittedDateString + + "\"\n" + + " },\n" + + " \"campaignFeedback\": null,\n" + + " \"privacyPolicyUrl\": \"" + + givenPrivacyPolicyUrl + + "\",\n" + + " \"termsAndConditionsUrl\": \"" + + givenTermsAndConditionsUrl + + "\",\n" + + " \"messageVolume\": \"HUNDRED\",\n" + + " \"numberKeys\": [\n" + + " \"" + + givenNumberKey + + "\"\n" + + " ],\n" + + " \"numberPreviews\": [\n" + + " {\n" + + " \"numberKey\": \"" + + givenNumberKey + + "\",\n" + + " \"number\": \"" + + givenNumberPreviewNumber + + "\",\n" + + " \"countryCode\": \"" + + givenNumberPreviewCountryCode + + "\"\n" + + " }\n" + + " ],\n" + + " \"useCase\": \"APP_NOTIFICATIONS\",\n" + + " \"programSummary\": \"" + + givenProgramSummary + + "\",\n" + + " \"exampleMessage\": \"" + + givenExampleMessage + + "\",\n" + + " \"optIns\": {\n" + + " \"keyword\": {\n" + + " \"callToAction\": \"" + + givenOptInCallToAction + + "\",\n" + + " \"keywords\": [\n" + + " \"" + + givenOptInKeyword + + "\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"optInImageURLs\": [\n" + + " \"" + + givenResponseOptInImageUrl + + "\"\n" + + " ],\n" + + " \"additionalInformation\": \"" + + givenAdditionalInformation + + "\",\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\",\n" + + " \"address\": {\n" + + " \"city\": \"" + + givenCity + + "\",\n" + + " \"state\": \"" + + givenState + + "\",\n" + + " \"street\": \"" + + givenStreet + + "\",\n" + + " \"zipCode\": \"" + + givenZipCode + + "\"\n" + + " },\n" + + " \"supportPhone\": \"" + + givenSupportPhone + + "\",\n" + + " \"supportEmail\": \"" + + givenResponseSupportEmail + + "\",\n" + + " \"businessContactFirstName\": \"" + + givenBusinessContactFirstName + + "\",\n" + + " \"businessContactLastName\": \"" + + givenBusinessContactLastName + + "\",\n" + + " \"businessDBA\": \"" + + givenResponseBusinessDba + + "\",\n" + + " \"businessName\": \"" + + givenResponseBusinessName + + "\",\n" + + " \"legalName\": \"" + + givenLegalName + + "\",\n" + + " \"businessWebsite\": \"" + + givenBusinessWebsite + + "\",\n" + + " \"customerCareEmail\": \"" + + givenResponseCustomerCareEmail + + "\",\n" + + " \"taxId\": \"" + + givenTaxId + + "\",\n" + + " \"taxIdIssuingCountry\": \"" + + givenTaxIdIssuingCountry + + "\",\n" + + " \"legalEntityType\": \"PRIVATE_COMPANY\",\n" + + " \"businessRegistrationType\": \"EIN\",\n" + + " \"type\": \"TOLL_FREE_UNIFIED_NUMBER\"\n" + + "}\n"; + + setUpPostRequest(CAMPAIGNS_TOLL_FREE, givenRequest, givenResponse, 201); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersTollFreeUnifiedNumberCampaignApiModel() + .referenceId(givenReferenceId) + .applicationId(givenApplicationId) + .entityId(givenEntityId) + .name(givenName) + .numbers(new java.util.LinkedHashSet<>(List.of(givenNumber))) + .exampleMessage(givenExampleMessage) + .programSummary(givenProgramSummary) + .termsAndConditionsUrl(givenTermsAndConditionsUrl) + .privacyPolicyUrl(givenPrivacyPolicyUrl) + .useCase(givenUseCase) + .optIns(new NumbersOptIns() + .keyword(new NumbersKeywordOptIn() + .callToAction(givenOptInCallToAction) + .addKeywordsItem(givenOptInKeyword))) + .messageVolume(givenMessageVolume) + .addOptInImageURLsItem(givenOptInImageUrl) + .additionalInformation(givenAdditionalInformation) + .customerCareEmail(givenCustomerCareEmail) + .countryCode(givenCountryCode) + .address(new NumbersAddress() + .city(givenCity) + .state(givenState) + .street(givenStreet) + .zipCode(givenZipCode)) + .supportPhone(givenSupportPhone) + .supportEmail(givenSupportEmail) + .businessContactFirstName(givenBusinessContactFirstName) + .businessContactLastName(givenBusinessContactLastName) + .businessDBA(givenBusinessDba) + .businessName(givenBusinessName) + .legalName(givenLegalName) + .businessWebsite(givenBusinessWebsite) + .taxId(givenTaxId) + .taxIdIssuingCountry(givenTaxIdIssuingCountry) + .legalEntityType(givenLegalEntityType) + .businessRegistrationType(givenBusinessRegistrationType) + .type(givenType); + + var call = api.createTollFreeCampaign(request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getId()).isEqualTo(givenId); + then(response.getReferenceId()).isEqualTo(givenReferenceId); + then(response.getApplicationId()).isEqualTo(givenApplicationId); + then(response.getEntityId()).isEqualTo(givenEntityId); + then(response.getName()).isEqualTo(givenResponseName); + then(response.getCreatedDate()).isEqualTo(givenCreatedDate); + then(response.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(response.getStage()).isEqualTo(givenStage); + then(response.getType()).isEqualTo(givenType); + then(response.getCampaignFeedback()).isNull(); + + NumbersPriorityInfo priority = response.getPriority(); + then(priority).isNotNull(); + then(priority.getPriorityId()).isNull(); + then(priority.getSubmittedDate()).isEqualTo(givenPrioritySubmittedDate); + + then(response.getPrivacyPolicyUrl()).isEqualTo(givenPrivacyPolicyUrl); + then(response.getTermsAndConditionsUrl()).isEqualTo(givenTermsAndConditionsUrl); + then(response.getMessageVolume()).isEqualTo(givenMessageVolume); + then(response.getNumberKeys()).containsExactly(givenNumberKey); + + then(response.getNumberPreviews()).isNotNull(); + then(response.getNumberPreviews().size()).isEqualTo(1); + NumbersNumberPreview numberPreview = + response.getNumberPreviews().iterator().next(); + then(numberPreview.getNumberKey()).isEqualTo(givenNumberKey); + then(numberPreview.getNumber()).isEqualTo(givenNumberPreviewNumber); + then(numberPreview.getCountryCode()).isEqualTo(givenNumberPreviewCountryCode); + + then(response.getUseCase()).isEqualTo(givenUseCase); + then(response.getProgramSummary()).isEqualTo(givenProgramSummary); + then(response.getExampleMessage()).isEqualTo(givenExampleMessage); + + NumbersOptIns optIns = response.getOptIns(); + then(optIns).isNotNull(); + then(optIns.getKeyword()).isNotNull(); + then(optIns.getKeyword().getCallToAction()).isEqualTo(givenOptInCallToAction); + then(optIns.getKeyword().getKeywords()).containsExactly(givenOptInKeyword); + + then(response.getOptInImageURLs()).containsExactly(givenResponseOptInImageUrl); + then(response.getAdditionalInformation()).isEqualTo(givenAdditionalInformation); + then(response.getCountryCode()).isEqualTo(givenCountryCode); + + NumbersAddress address = response.getAddress(); + then(address).isNotNull(); + then(address.getCity()).isEqualTo(givenCity); + then(address.getState()).isEqualTo(givenState); + then(address.getStreet()).isEqualTo(givenStreet); + then(address.getZipCode()).isEqualTo(givenZipCode); + + then(response.getSupportPhone()).isEqualTo(givenSupportPhone); + then(response.getSupportEmail()).isEqualTo(givenResponseSupportEmail); + then(response.getBusinessContactFirstName()).isEqualTo(givenBusinessContactFirstName); + then(response.getBusinessContactLastName()).isEqualTo(givenBusinessContactLastName); + then(response.getBusinessDBA()).isEqualTo(givenResponseBusinessDba); + then(response.getBusinessName()).isEqualTo(givenResponseBusinessName); + then(response.getLegalName()).isEqualTo(givenLegalName); + then(response.getBusinessWebsite()).isEqualTo(givenBusinessWebsite); + then(response.getCustomerCareEmail()).isEqualTo(givenResponseCustomerCareEmail); + then(response.getTaxId()).isEqualTo(givenTaxId); + then(response.getTaxIdIssuingCountry()).isEqualTo(givenTaxIdIssuingCountry); + then(response.getLegalEntityType()).isEqualTo(givenLegalEntityType); + then(response.getBusinessRegistrationType()).isEqualTo(givenBusinessRegistrationType); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetCampaign() { + UUID givenId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenReferenceId = "customer-defined-identifier"; + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Promo"; + String givenCreatedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + NumbersCampaignStage givenStage = NumbersCampaignStage.DRAFT; + UUID givenPriorityId = UUID.fromString("46de4f63-390c-4253-9869-da282096691b"); + String givenPrioritySubmittedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenPrioritySubmittedDate = OffsetDateTime.parse(givenPrioritySubmittedDateString); + UUID givenBrandId = UUID.fromString("a0c63335-f841-4d43-9ef8-e0765a233f29"); + String givenProgramSummary = "A mix of promotional and informational messaging."; + String givenCustomerCareEmail = "examples@example.com"; + String givenConfirmationMessage = + "Example promotional-marketing. Msg&data rates may apply. Reply HELP for help, STOP to cancel."; + String givenExampleMessage = "Come in today and get 10% OFF today!"; + String givenHelpMessage = + "Example promotional-marketing: Help at textsupport@example.com or 18889997777. Msg&data rates may apply. Reply STOP to cancel."; + String givenStopMessage = + "Example promotional-marketing: You have been unsubscribed, no more messages will be sent."; + String givenTermsAndConditionsUrl = "https://www.example.com/terms-and-conditions"; + String givenOptInCallToAction = "Text MESSAGE to subscribe"; + String givenOptInKeyword = "MESSAGE"; + String givenBrandPreviewBrandId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + String givenBrandPreviewBrandName = "Examples Warehouse"; + String givenCustomerCarePhone = "41785473249"; + Boolean givenLowVolume = false; + NumbersTenDlcUseCase givenUseCase1 = NumbersTenDlcUseCase.PROMOTIONAL_MARKETING; + NumbersTenDlcUseCase givenUseCase2 = NumbersTenDlcUseCase.EDUCATION; + String givenNumberKey = "2C958BA98F9EBACA4F9357D81BFBF47B"; + String givenNumber = "41793026727"; + String givenCountryCode = "US"; + Boolean givenAgeGated = true; + Boolean givenDirectLending = false; + Boolean givenEmbeddedLink = true; + Boolean givenEmbeddedPhone = false; + NumbersCampaignType givenType = NumbersCampaignType.TEN_DIGIT_LONG_CODE; + String givenRejectionReason1 = + "Campaign appears to be for an age-gated content type but age gate attribute is not selected."; + String givenRejectionReason2 = "This is a custom rejection reason provided by a reviewer."; + String givenRejectionErrorCode1 = "1001"; + String givenRejectionDescription1 = + "Campaign appears to be for an age-gated content type but age gate attribute is not selected."; + String givenRejectionRecommendedAction1 = + "Verify if the Age Gate attribute is selected for the campaign registration. If the campaign is not related to age-gated content, update the campaign description."; + String givenRejectionErrorCode2 = "9999"; + String givenRejectionDescription2 = "This is a custom rejection reason provided by a reviewer."; + String givenRejectionDateString = "2019-08-23T14:15:22Z"; + OffsetDateTime givenRejectionDate = OffsetDateTime.parse(givenRejectionDateString); + String givenAppealReason = "Example appeal reason"; + String givenAppealDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenAppealDate = OffsetDateTime.parse(givenAppealDateString); + + String givenResponse = "{\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"stage\": \"DRAFT\",\n" + + " \"priority\": {\n" + + " \"priorityId\": \"" + + givenPriorityId + + "\",\n" + + " \"submittedDate\": \"" + + givenPrioritySubmittedDateString + + "\"\n" + + " },\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"programSummary\": \"" + + givenProgramSummary + + "\",\n" + + " \"customerCareEmail\": \"" + + givenCustomerCareEmail + + "\",\n" + + " \"confirmationMessage\": \"" + + givenConfirmationMessage + + "\",\n" + + " \"exampleMessages\": [\n" + + " \"" + + givenExampleMessage + + "\"\n" + + " ],\n" + + " \"helpMessage\": \"" + + givenHelpMessage + + "\",\n" + + " \"stopMessage\": \"" + + givenStopMessage + + "\",\n" + + " \"messageTypes\": [\n" + + " \"SMS\",\n" + + " \"MMS\"\n" + + " ],\n" + + " \"termsAndConditionsUrl\": \"" + + givenTermsAndConditionsUrl + + "\",\n" + + " \"optIns\": {\n" + + " \"keyword\": {\n" + + " \"callToAction\": \"" + + givenOptInCallToAction + + "\",\n" + + " \"keywords\": [\n" + + " \"" + + givenOptInKeyword + + "\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"brandPreview\": {\n" + + " \"brandId\": \"" + + givenBrandPreviewBrandId + + "\",\n" + + " \"brandName\": \"" + + givenBrandPreviewBrandName + + "\"\n" + + " },\n" + + " \"customerCarePhone\": \"" + + givenCustomerCarePhone + + "\",\n" + + " \"lowVolume\": false,\n" + + " \"useCase\": null,\n" + + " \"useCases\": [\n" + + " \"PROMOTIONAL_MARKETING\",\n" + + " \"EDUCATION\"\n" + + " ],\n" + + " \"numberKeys\": [\n" + + " \"" + + givenNumberKey + + "\"\n" + + " ],\n" + + " \"numberPreviews\": [\n" + + " {\n" + + " \"numberKey\": \"" + + givenNumberKey + + "\",\n" + + " \"number\": \"" + + givenNumber + + "\",\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\"\n" + + " }\n" + + " ],\n" + + " \"ageGated\": true,\n" + + " \"directLending\": false,\n" + + " \"embeddedLink\": true,\n" + + " \"embeddedPhone\": false,\n" + + " \"type\": \"TEN_DIGIT_LONG_CODE\",\n" + + " \"campaignFeedback\": {\n" + + " \"rejectionReasons\": [\n" + + " \"" + + givenRejectionReason1 + + "\",\n" + + " \"" + + givenRejectionReason2 + + "\"\n" + + " ],\n" + + " \"rejectionDetails\": [\n" + + " {\n" + + " \"errorCode\": \"" + + givenRejectionErrorCode1 + + "\",\n" + + " \"description\": \"" + + givenRejectionDescription1 + + "\",\n" + + " \"recommendedAction\": \"" + + givenRejectionRecommendedAction1 + + "\"\n" + + " },\n" + + " {\n" + + " \"errorCode\": \"" + + givenRejectionErrorCode2 + + "\",\n" + + " \"description\": \"" + + givenRejectionDescription2 + + "\",\n" + + " \"recommendedAction\": null\n" + + " }\n" + + " ],\n" + + " \"rejectionDate\": \"" + + givenRejectionDateString + + "\"\n" + + " },\n" + + " \"appealData\": {\n" + + " \"appealReason\": \"" + + givenAppealReason + + "\",\n" + + " \"appealDate\": \"" + + givenAppealDateString + + "\"\n" + + " }\n" + + "}\n"; + + setUpSuccessGetRequest(CAMPAIGN.replace("{campaignId}", givenId.toString()), Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getCampaign(givenId); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getClass()).isEqualTo(NumbersTenDlcCampaign.class); + then(response.getId()).isEqualTo(givenId); + then(response.getApplicationId()).isEqualTo(givenApplicationId); + then(response.getEntityId()).isEqualTo(givenEntityId); + then(response.getName()).isEqualTo(givenName); + then(response.getCreatedDate()).isEqualTo(givenCreatedDate); + then(response.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(response.getStage()).isEqualTo(givenStage); + then(response.getType()).isEqualTo(givenType); + + NumbersPriorityInfo priority = response.getPriority(); + then(priority).isNotNull(); + then(priority.getPriorityId()).isEqualTo(givenPriorityId); + then(priority.getSubmittedDate()).isEqualTo(givenPrioritySubmittedDate); + + NumbersCampaignFeedback feedback = response.getCampaignFeedback(); + then(feedback).isNotNull(); + then(feedback.getRejectionReasons()).containsExactly(givenRejectionReason1, givenRejectionReason2); + then(feedback.getRejectionDate()).isEqualTo(givenRejectionDate); + then(feedback.getRejectionDetails()).isNotNull(); + then(feedback.getRejectionDetails().size()).isEqualTo(2); + NumbersRejectionReason detail1 = feedback.getRejectionDetails().get(0); + then(detail1.getErrorCode()).isEqualTo(givenRejectionErrorCode1); + then(detail1.getDescription()).isEqualTo(givenRejectionDescription1); + then(detail1.getRecommendedAction()).isEqualTo(givenRejectionRecommendedAction1); + NumbersRejectionReason detail2 = feedback.getRejectionDetails().get(1); + then(detail2.getErrorCode()).isEqualTo(givenRejectionErrorCode2); + then(detail2.getDescription()).isEqualTo(givenRejectionDescription2); + then(detail2.getRecommendedAction()).isNull(); + + NumbersTenDlcCampaign tenDlcCampaign = (NumbersTenDlcCampaign) response; + then(tenDlcCampaign.getBrandId()).isEqualTo(givenBrandId); + then(tenDlcCampaign.getProgramSummary()).isEqualTo(givenProgramSummary); + then(tenDlcCampaign.getCustomerCareEmail()).isEqualTo(givenCustomerCareEmail); + then(tenDlcCampaign.getConfirmationMessage()).isEqualTo(givenConfirmationMessage); + then(tenDlcCampaign.getExampleMessages()).containsExactly(givenExampleMessage); + then(tenDlcCampaign.getHelpMessage()).isEqualTo(givenHelpMessage); + then(tenDlcCampaign.getStopMessage()).isEqualTo(givenStopMessage); + then(tenDlcCampaign.getTermsAndConditionsUrl()).isEqualTo(givenTermsAndConditionsUrl); + then(tenDlcCampaign.getCustomerCarePhone()).isEqualTo(givenCustomerCarePhone); + then(tenDlcCampaign.getLowVolume()).isEqualTo(givenLowVolume); + then(tenDlcCampaign.getUseCases()).containsExactlyInAnyOrder(givenUseCase1, givenUseCase2); + then(tenDlcCampaign.getAgeGated()).isEqualTo(givenAgeGated); + then(tenDlcCampaign.getDirectLending()).isEqualTo(givenDirectLending); + then(tenDlcCampaign.getEmbeddedLink()).isEqualTo(givenEmbeddedLink); + then(tenDlcCampaign.getEmbeddedPhone()).isEqualTo(givenEmbeddedPhone); + then(tenDlcCampaign.getNumberKeys()).containsExactly(givenNumberKey); + + NumbersOptIns optIns = tenDlcCampaign.getOptIns(); + then(optIns).isNotNull(); + then(optIns.getKeyword()).isNotNull(); + then(optIns.getKeyword().getCallToAction()).isEqualTo(givenOptInCallToAction); + then(optIns.getKeyword().getKeywords()).containsExactly(givenOptInKeyword); + + NumbersBrandPreview brandPreview = tenDlcCampaign.getBrandPreview(); + then(brandPreview).isNotNull(); + then(brandPreview.getBrandId()).isEqualTo(givenBrandPreviewBrandId); + then(brandPreview.getBrandName()).isEqualTo(givenBrandPreviewBrandName); + + then(tenDlcCampaign.getNumberPreviews()).isNotNull(); + then(tenDlcCampaign.getNumberPreviews().size()).isEqualTo(1); + NumbersNumberPreview numberPreview = + tenDlcCampaign.getNumberPreviews().iterator().next(); + then(numberPreview.getNumberKey()).isEqualTo(givenNumberKey); + then(numberPreview.getNumber()).isEqualTo(givenNumber); + then(numberPreview.getCountryCode()).isEqualTo(givenCountryCode); + + NumbersAppealData appealData = tenDlcCampaign.getAppealData(); + then(appealData).isNotNull(); + then(appealData.getAppealReason()).isEqualTo(givenAppealReason); + then(appealData.getAppealDate()).isEqualTo(givenAppealDate); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateCampaign() { + UUID givenId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenReferenceId = "customer-defined-identifier"; + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Promo"; + String givenNumber = "41785473249"; + UUID givenBrandId = UUID.fromString("a0c63335-f841-4d43-9ef8-e0765a233f29"); + String givenConfirmationMessage = + "Example promotional-marketing. Msg&data rates may apply. Reply HELP for help, STOP to cancel."; + String givenCustomerCarePhone = "41785473249"; + String givenCustomerCareEmail = "examples@example.com"; + String givenExampleMessage = "Come in today and get 10% OFF today!"; + String givenHelpMessage = + "Example promotional-marketing: Help at textsupport@example.com or 18889997777. Msg&data rates may apply. Reply STOP to cancel."; + Boolean givenLowVolume = false; + String givenProgramSummary = "A mix of promotional and informational messaging."; + String givenStopMessage = + "Example promotional-marketing: You have been unsubscribed, no more messages will be sent."; + String givenTermsAndConditionsUrl = "https://www.example.com/terms-and-conditions"; + NumbersTenDlcUseCase givenUseCase1 = NumbersTenDlcUseCase.PROMOTIONAL_MARKETING; + NumbersTenDlcUseCase givenUseCase2 = NumbersTenDlcUseCase.EDUCATION; + String givenRequestOptInCallToAction = + "Text MESSAGE to subscribe to recurring promotional marketing alerts. Msg&DataRates may apply. Text HELP for help, STOP to opt out. Terms and PP https://www.example.om/terms-of-service/"; + String givenResponseOptInCallToAction = "Text MESSAGE to subscribe"; + String givenOptInKeyword = "MESSAGE"; + Boolean givenAgeGated = true; + Boolean givenDirectLending = false; + Boolean givenEmbeddedLink = true; + Boolean givenEmbeddedPhone = false; + String givenCreatedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenCreatedDate = OffsetDateTime.parse(givenCreatedDateString); + String givenLastModifiedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenLastModifiedDate = OffsetDateTime.parse(givenLastModifiedDateString); + NumbersCampaignStage givenStage = NumbersCampaignStage.DRAFT; + UUID givenPriorityId = UUID.fromString("46de4f63-390c-4253-9869-da282096691b"); + String givenPrioritySubmittedDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenPrioritySubmittedDate = OffsetDateTime.parse(givenPrioritySubmittedDateString); + String givenBrandPreviewBrandId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + String givenBrandPreviewBrandName = "Examples Warehouse"; + String givenNumberKey = "2C958BA98F9EBACA4F9357D81BFBF47B"; + String givenNumberPreviewNumber = "41793026727"; + String givenCountryCode = "US"; + String givenRejectionReason1 = + "Campaign appears to be for an age-gated content type but age gate attribute is not selected."; + String givenRejectionReason2 = "This is a custom rejection reason provided by a reviewer."; + String givenRejectionErrorCode1 = "1001"; + String givenRejectionDescription1 = + "Campaign appears to be for an age-gated content type but age gate attribute is not selected."; + String givenRejectionRecommendedAction1 = + "Verify if the Age Gate attribute is selected for the campaign registration. If the campaign is not related to age-gated content, update the campaign description."; + String givenRejectionErrorCode2 = "9999"; + String givenRejectionDescription2 = "This is a custom rejection reason provided by a reviewer."; + String givenRejectionDateString = "2019-08-23T14:15:22Z"; + OffsetDateTime givenRejectionDate = OffsetDateTime.parse(givenRejectionDateString); + String givenAppealReason = "Example appeal reason"; + String givenAppealDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenAppealDate = OffsetDateTime.parse(givenAppealDateString); + NumbersCampaignType givenType = NumbersCampaignType.TEN_DIGIT_LONG_CODE; + + String givenRequest = "{\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"type\": \"TEN_DIGIT_LONG_CODE\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"numbers\": [\n" + + " \"" + + givenNumber + + "\"\n" + + " ],\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"confirmationMessage\": \"" + + givenConfirmationMessage + + "\",\n" + + " \"customerCarePhone\": \"" + + givenCustomerCarePhone + + "\",\n" + + " \"customerCareEmail\": \"" + + givenCustomerCareEmail + + "\",\n" + + " \"exampleMessages\": [\n" + + " \"" + + givenExampleMessage + + "\"\n" + + " ],\n" + + " \"helpMessage\": \"" + + givenHelpMessage + + "\",\n" + + " \"lowVolume\": false,\n" + + " \"messageTypes\": [\n" + + " \"SMS\",\n" + + " \"MMS\"\n" + + " ],\n" + + " \"programSummary\": \"" + + givenProgramSummary + + "\",\n" + + " \"stopMessage\": \"" + + givenStopMessage + + "\",\n" + + " \"termsAndConditionsUrl\": \"" + + givenTermsAndConditionsUrl + + "\",\n" + + " \"useCases\": [\n" + + " \"PROMOTIONAL_MARKETING\",\n" + + " \"EDUCATION\"\n" + + " ],\n" + + " \"optIns\": {\n" + + " \"keyword\": {\n" + + " \"callToAction\": \"" + + givenRequestOptInCallToAction + + "\",\n" + + " \"keywords\": [\n" + + " \"" + + givenOptInKeyword + + "\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"ageGated\": true,\n" + + " \"directLending\": false,\n" + + " \"embeddedLink\": true,\n" + + " \"embeddedPhone\": false\n" + + "}\n"; + + String givenResponse = "{\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"referenceId\": \"" + + givenReferenceId + + "\",\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\",\n" + + " \"name\": \"" + + givenName + + "\",\n" + + " \"createdDate\": \"" + + givenCreatedDateString + + "\",\n" + + " \"lastModifiedDate\": \"" + + givenLastModifiedDateString + + "\",\n" + + " \"stage\": \"DRAFT\",\n" + + " \"priority\": {\n" + + " \"priorityId\": \"" + + givenPriorityId + + "\",\n" + + " \"submittedDate\": \"" + + givenPrioritySubmittedDateString + + "\"\n" + + " },\n" + + " \"brandId\": \"" + + givenBrandId + + "\",\n" + + " \"programSummary\": \"" + + givenProgramSummary + + "\",\n" + + " \"customerCareEmail\": \"" + + givenCustomerCareEmail + + "\",\n" + + " \"confirmationMessage\": \"" + + givenConfirmationMessage + + "\",\n" + + " \"exampleMessages\": [\n" + + " \"" + + givenExampleMessage + + "\"\n" + + " ],\n" + + " \"helpMessage\": \"" + + givenHelpMessage + + "\",\n" + + " \"stopMessage\": \"" + + givenStopMessage + + "\",\n" + + " \"messageTypes\": [\n" + + " \"SMS\",\n" + + " \"MMS\"\n" + + " ],\n" + + " \"termsAndConditionsUrl\": \"" + + givenTermsAndConditionsUrl + + "\",\n" + + " \"optIns\": {\n" + + " \"keyword\": {\n" + + " \"callToAction\": \"" + + givenResponseOptInCallToAction + + "\",\n" + + " \"keywords\": [\n" + + " \"" + + givenOptInKeyword + + "\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"brandPreview\": {\n" + + " \"brandId\": \"" + + givenBrandPreviewBrandId + + "\",\n" + + " \"brandName\": \"" + + givenBrandPreviewBrandName + + "\"\n" + + " },\n" + + " \"customerCarePhone\": \"" + + givenCustomerCarePhone + + "\",\n" + + " \"lowVolume\": false,\n" + + " \"useCase\": null,\n" + + " \"useCases\": [\n" + + " \"PROMOTIONAL_MARKETING\",\n" + + " \"EDUCATION\"\n" + + " ],\n" + + " \"numberKeys\": [\n" + + " \"" + + givenNumberKey + + "\"\n" + + " ],\n" + + " \"numberPreviews\": [\n" + + " {\n" + + " \"numberKey\": \"" + + givenNumberKey + + "\",\n" + + " \"number\": \"" + + givenNumberPreviewNumber + + "\",\n" + + " \"countryCode\": \"" + + givenCountryCode + + "\"\n" + + " }\n" + + " ],\n" + + " \"ageGated\": true,\n" + + " \"directLending\": false,\n" + + " \"embeddedLink\": true,\n" + + " \"embeddedPhone\": false,\n" + + " \"type\": \"TEN_DIGIT_LONG_CODE\",\n" + + " \"campaignFeedback\": {\n" + + " \"rejectionReasons\": [\n" + + " \"" + + givenRejectionReason1 + + "\",\n" + + " \"" + + givenRejectionReason2 + + "\"\n" + + " ],\n" + + " \"rejectionDetails\": [\n" + + " {\n" + + " \"errorCode\": \"" + + givenRejectionErrorCode1 + + "\",\n" + + " \"description\": \"" + + givenRejectionDescription1 + + "\",\n" + + " \"recommendedAction\": \"" + + givenRejectionRecommendedAction1 + + "\"\n" + + " },\n" + + " {\n" + + " \"errorCode\": \"" + + givenRejectionErrorCode2 + + "\",\n" + + " \"description\": \"" + + givenRejectionDescription2 + + "\",\n" + + " \"recommendedAction\": null\n" + + " }\n" + + " ],\n" + + " \"rejectionDate\": \"" + + givenRejectionDateString + + "\"\n" + + " },\n" + + " \"appealData\": {\n" + + " \"appealReason\": \"" + + givenAppealReason + + "\",\n" + + " \"appealDate\": \"" + + givenAppealDateString + + "\"\n" + + " }\n" + + "}\n"; + + setUpSuccessPutRequest( + CAMPAIGN.replace("{campaignId}", givenId.toString()), Map.of(), givenRequest, givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersTenDlcCampaign() + .brandId(givenBrandId) + .numbers(new java.util.LinkedHashSet<>(List.of(givenNumber))) + .programSummary(givenProgramSummary) + .confirmationMessage(givenConfirmationMessage) + .exampleMessages(List.of(givenExampleMessage)) + .helpMessage(givenHelpMessage) + .stopMessage(givenStopMessage) + .messageTypes(new java.util.LinkedHashSet<>(List.of(NumbersMessageType.SMS, NumbersMessageType.MMS))) + .termsAndConditionsUrl(givenTermsAndConditionsUrl) + .optIns(new NumbersOptIns() + .keyword(new NumbersKeywordOptIn() + .callToAction(givenRequestOptInCallToAction) + .addKeywordsItem(givenOptInKeyword))) + .ageGated(givenAgeGated) + .customerCarePhone(givenCustomerCarePhone) + .lowVolume(givenLowVolume) + .useCases(new java.util.LinkedHashSet<>(List.of(givenUseCase1, givenUseCase2))) + .directLending(givenDirectLending) + .embeddedLink(givenEmbeddedLink) + .embeddedPhone(givenEmbeddedPhone) + .customerCareEmail(givenCustomerCareEmail); + request.referenceId(givenReferenceId); + request.applicationId(givenApplicationId); + request.entityId(givenEntityId); + request.name(givenName); + + var call = api.updateCampaign(givenId, request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getClass()).isEqualTo(NumbersTenDlcCampaign.class); + then(response.getId()).isEqualTo(givenId); + then(response.getApplicationId()).isEqualTo(givenApplicationId); + then(response.getEntityId()).isEqualTo(givenEntityId); + then(response.getName()).isEqualTo(givenName); + then(response.getCreatedDate()).isEqualTo(givenCreatedDate); + then(response.getLastModifiedDate()).isEqualTo(givenLastModifiedDate); + then(response.getStage()).isEqualTo(givenStage); + then(response.getType()).isEqualTo(givenType); + + NumbersPriorityInfo priority = response.getPriority(); + then(priority).isNotNull(); + then(priority.getPriorityId()).isEqualTo(givenPriorityId); + then(priority.getSubmittedDate()).isEqualTo(givenPrioritySubmittedDate); + + NumbersCampaignFeedback feedback = response.getCampaignFeedback(); + then(feedback).isNotNull(); + then(feedback.getRejectionReasons()).containsExactly(givenRejectionReason1, givenRejectionReason2); + then(feedback.getRejectionDate()).isEqualTo(givenRejectionDate); + then(feedback.getRejectionDetails()).isNotNull(); + then(feedback.getRejectionDetails().size()).isEqualTo(2); + NumbersRejectionReason detail1 = feedback.getRejectionDetails().get(0); + then(detail1.getErrorCode()).isEqualTo(givenRejectionErrorCode1); + then(detail1.getDescription()).isEqualTo(givenRejectionDescription1); + then(detail1.getRecommendedAction()).isEqualTo(givenRejectionRecommendedAction1); + NumbersRejectionReason detail2 = feedback.getRejectionDetails().get(1); + then(detail2.getErrorCode()).isEqualTo(givenRejectionErrorCode2); + then(detail2.getDescription()).isEqualTo(givenRejectionDescription2); + then(detail2.getRecommendedAction()).isNull(); + + NumbersTenDlcCampaign tenDlcCampaign = (NumbersTenDlcCampaign) response; + then(tenDlcCampaign.getBrandId()).isEqualTo(givenBrandId); + then(tenDlcCampaign.getProgramSummary()).isEqualTo(givenProgramSummary); + then(tenDlcCampaign.getCustomerCareEmail()).isEqualTo(givenCustomerCareEmail); + then(tenDlcCampaign.getConfirmationMessage()).isEqualTo(givenConfirmationMessage); + then(tenDlcCampaign.getExampleMessages()).containsExactly(givenExampleMessage); + then(tenDlcCampaign.getHelpMessage()).isEqualTo(givenHelpMessage); + then(tenDlcCampaign.getStopMessage()).isEqualTo(givenStopMessage); + then(tenDlcCampaign.getTermsAndConditionsUrl()).isEqualTo(givenTermsAndConditionsUrl); + then(tenDlcCampaign.getCustomerCarePhone()).isEqualTo(givenCustomerCarePhone); + then(tenDlcCampaign.getLowVolume()).isEqualTo(givenLowVolume); + then(tenDlcCampaign.getUseCases()).containsExactlyInAnyOrder(givenUseCase1, givenUseCase2); + then(tenDlcCampaign.getAgeGated()).isEqualTo(givenAgeGated); + then(tenDlcCampaign.getDirectLending()).isEqualTo(givenDirectLending); + then(tenDlcCampaign.getEmbeddedLink()).isEqualTo(givenEmbeddedLink); + then(tenDlcCampaign.getEmbeddedPhone()).isEqualTo(givenEmbeddedPhone); + then(tenDlcCampaign.getNumberKeys()).containsExactly(givenNumberKey); + + NumbersOptIns optIns = tenDlcCampaign.getOptIns(); + then(optIns).isNotNull(); + then(optIns.getKeyword()).isNotNull(); + then(optIns.getKeyword().getCallToAction()).isEqualTo(givenResponseOptInCallToAction); + then(optIns.getKeyword().getKeywords()).containsExactly(givenOptInKeyword); + + NumbersBrandPreview brandPreview = tenDlcCampaign.getBrandPreview(); + then(brandPreview).isNotNull(); + then(brandPreview.getBrandId()).isEqualTo(givenBrandPreviewBrandId); + then(brandPreview.getBrandName()).isEqualTo(givenBrandPreviewBrandName); + + then(tenDlcCampaign.getNumberPreviews()).isNotNull(); + then(tenDlcCampaign.getNumberPreviews().size()).isEqualTo(1); + NumbersNumberPreview numberPreview = + tenDlcCampaign.getNumberPreviews().iterator().next(); + then(numberPreview.getNumberKey()).isEqualTo(givenNumberKey); + then(numberPreview.getNumber()).isEqualTo(givenNumberPreviewNumber); + then(numberPreview.getCountryCode()).isEqualTo(givenCountryCode); + + NumbersAppealData appealData = tenDlcCampaign.getAppealData(); + then(appealData).isNotNull(); + then(appealData.getAppealReason()).isEqualTo(givenAppealReason); + then(appealData.getAppealDate()).isEqualTo(givenAppealDate); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDeleteCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + + setUpNoResponseBodyDeleteRequest(CAMPAIGN.replace("{campaignId}", givenCampaignId.toString()), Map.of(), 204); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.deleteCampaign(givenCampaignId); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldSubmitCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + UUID givenPriorityId = UUID.fromString("3fa85f64-5717-4562-b3fc-2c963f66afa6"); + + String givenRequest = "{\n" + " \"priorityId\": \"" + givenPriorityId + "\"\n" + "}\n"; + + setUpNoResponseBodyPostRequest( + REGISTER_CAMPAIGN.replace("{campaignId}", givenCampaignId.toString()), Map.of(), givenRequest, 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersRegisterCampaignRequest().priorityId(givenPriorityId); + + var call = api.registerCampaign(givenCampaignId, request); + testSuccessfulCallWithNoBody(call::executeAsync, 202); + } + + @Test + void shouldGetCampaignNetworkStatuses() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + NumbersNetwork givenNetwork1 = NumbersNetwork.ATT; + NumbersNetworkState givenState1 = NumbersNetworkState.ACTIVE; + String givenMessageClass1 = "A"; + Integer givenThroughput1 = 4500; + + String givenResponse = "{\n" + + " \"network\": \"ATT\",\n" + + " \"state\": \"ACTIVE\",\n" + + " \"messageClass\": \"" + + givenMessageClass1 + + "\",\n" + + " \"throughput\": " + + givenThroughput1 + + ",\n" + + " \"brandTier\": null\n" + + "}\n"; + + setUpSuccessGetRequest( + CAMPAIGN_NETWORK_STATUSES.replace("{campaignId}", givenCampaignId.toString()), Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getCampaignNetworkStatuses(givenCampaignId); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getNetwork()).isEqualTo(givenNetwork1); + then(response.getState()).isEqualTo(givenState1); + then(response.getMessageClass()).isEqualTo(givenMessageClass1); + then(response.getThroughput()).isEqualTo(givenThroughput1); + then(response.getBrandTier()).isNull(); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDeregisterCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + + setUpNoBodyPostRequest(DEREGISTER_CAMPAIGN.replace("{campaignId}", givenCampaignId.toString()), Map.of(), 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.deregisterCampaign(givenCampaignId); + testSuccessfulCallWithNoBody(call::executeAsync, 202); + } + + @Test + void shouldUpdateRegisteredCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenNumberKey1 = "8F665E5F6582E586BA9DF4D227035298"; + String givenNumberKey2 = "D79C1785A82A2BC6FC0B867DCD055215"; + + String givenRequest = + String.format("{" + "\"numberKeys\":[\"%s\",\"%s\"]" + "}", givenNumberKey1, givenNumberKey2); + + setUpNoResponseBodyPostRequest( + UPDATE_REGISTRATION.replace("{campaignId}", givenCampaignId.toString()), Map.of(), givenRequest, 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersUpdateCampaignRegistrationRequest() + .numberKeys(new java.util.LinkedHashSet<>(List.of(givenNumberKey1, givenNumberKey2))); + + var call = api.updateRegisteredCampaign(givenCampaignId, request); + testSuccessfulCallWithNoBody(call::executeAsync, 202); + } + + @Test + void shouldAddNumbersToRegisteredCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenNumberKey1 = "8F665E5F6582E586BA9DF4D227035298"; + String givenNumberKey2 = "D79C1785A82A2BC6FC0B867DCD055215"; + + String givenRequest = + String.format("{" + "\"numberKeys\":[\"%s\",\"%s\"]" + "}", givenNumberKey1, givenNumberKey2); + + setUpNoResponseBodyPostRequest( + ADD_NUMBERS.replace("{campaignId}", givenCampaignId.toString()), Map.of(), givenRequest, 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersUpdateCampaignRegistrationRequest() + .numberKeys(new java.util.LinkedHashSet<>(List.of(givenNumberKey1, givenNumberKey2))); + + var call = api.addNumbers(givenCampaignId, request); + testSuccessfulCallWithNoBody(call::executeAsync, 202); + } + + @Test + void shouldRemoveNumbersFromRegisteredCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenNumberKey1 = "8F665E5F6582E586BA9DF4D227035298"; + String givenNumberKey2 = "D79C1785A82A2BC6FC0B867DCD055215"; + + String givenRequest = + String.format("{" + "\"numberKeys\":[\"%s\",\"%s\"]" + "}", givenNumberKey1, givenNumberKey2); + + setUpNoResponseBodyPostRequest( + REMOVE_NUMBERS.replace("{campaignId}", givenCampaignId.toString()), Map.of(), givenRequest, 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersUpdateCampaignRegistrationRequest() + .numberKeys(new java.util.LinkedHashSet<>(List.of(givenNumberKey1, givenNumberKey2))); + + var call = api.removeNumbers(givenCampaignId, request); + testSuccessfulCallWithNoBody(call::executeAsync, 202); + } + + @Test + void shouldGetCampaignNumbers() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenNumberKey1 = "2C958BA98F9EBACA4F9357D81BFBF47B"; + String givenNumber1 = "41793026727"; + String givenCountryCode1 = "US"; + String givenNumberKey2 = "D79C1785A82A2BC6FC0B867DCD055215"; + String givenNumber2 = "42893024539"; + String givenCountryCode2 = "US"; + + String givenResponse = String.format( + "{" + + "\"numberPreviews\":[" + + "{\"numberKey\":\"%s\",\"number\":\"%s\",\"countryCode\":\"%s\"}," + + "{\"numberKey\":\"%s\",\"number\":\"%s\",\"countryCode\":\"%s\"}" + + "]" + + "}", + givenNumberKey1, givenNumber1, givenCountryCode1, givenNumberKey2, givenNumber2, givenCountryCode2); + + setUpSuccessGetRequest( + CAMPAIGN_NUMBERS.replace("{campaignId}", givenCampaignId.toString()), Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getCampaignNumbers(givenCampaignId); + + Consumer assertions = response -> { + then(response).isNotNull(); + var firstPreview = response.getNumberPreviews().stream() + .filter(p -> givenNumberKey1.equals(p.getNumberKey())) + .findFirst() + .orElseThrow(); + then(firstPreview.getNumber()).isEqualTo(givenNumber1); + then(firstPreview.getCountryCode()).isEqualTo(givenCountryCode1); + var secondPreview = response.getNumberPreviews().stream() + .filter(p -> givenNumberKey2.equals(p.getNumberKey())) + .findFirst() + .orElseThrow(); + then(secondPreview.getNumber()).isEqualTo(givenNumber2); + then(secondPreview.getCountryCode()).isEqualTo(givenCountryCode2); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldAppealCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenReason = "Example appeal reason"; + + String givenRequest = String.format("{\"reason\":\"%s\"}", givenReason); + + setUpNoResponseBodyPostRequest( + APPEAL_CAMPAIGN.replace("{campaignId}", givenCampaignId.toString()), Map.of(), givenRequest, 204); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersAppealRequest().reason(givenReason); + + var call = api.appealCampaign(givenCampaignId, request); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldGetCampaignPriorities() { + UUID givenPriorityId1 = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + Integer givenDailySubmitLimit1 = 10; + NumbersPriorityTimeUnit givenTimeUnit1 = NumbersPriorityTimeUnit.HOURS; + Integer givenAmount1 = 2; + + String givenResponse = String.format( + "{\"priorityId\":\"%s\",\"dailySubmitLimit\":%d,\"reviewTime\":{\"timeUnit\":\"%s\",\"amount\":%d}}", + givenPriorityId1, givenDailySubmitLimit1, givenTimeUnit1.getValue(), givenAmount1); + + setUpSuccessGetRequest(CAMPAIGN_PRIORITIES, Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getCampaignPriorities(); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getPriorityId()).isEqualTo(givenPriorityId1); + then(response.getDailySubmitLimit()).isEqualTo(givenDailySubmitLimit1); + then(response.getReviewTime().getTimeUnit()).isEqualTo(givenTimeUnit1); + then(response.getReviewTime().getAmount()).isEqualTo(givenAmount1); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldAttachNumberPoolToCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenNumberPoolId = "number-pool-identifier"; + String givenReason = "Example attach reason"; + + String givenRequest = + String.format("{\"numberPoolId\":\"%s\",\"reason\":\"%s\"}", givenNumberPoolId, givenReason); + + setUpNoResponseBodyPostRequest( + ATTACH_NUMBER_POOL.replace("{campaignId}", givenCampaignId.toString()), Map.of(), givenRequest, 204); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersAttachNumberPoolRequest() + .numberPoolId(givenNumberPoolId) + .reason(givenReason); + + var call = api.attachNumberPool(givenCampaignId, request); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldDetachNumberPoolFromCampaign() { + UUID givenCampaignId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + + setUpNoBodyPostRequest(DETACH_NUMBER_POOL.replace("{campaignId}", givenCampaignId.toString()), Map.of(), 204); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.detachNumberPool(givenCampaignId); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldReceiveCampaignNetworkStatusUpdate() { + UUID givenCampaignId = UUID.fromString("38a1c2c6-55f2-11ee-a061-325096b39f47"); + String givenReceivedAtString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenReceivedAt = OffsetDateTime.parse(givenReceivedAtString); + NumbersCampaignRegistrar givenCampaignNetwork = NumbersCampaignRegistrar.VERIZON; + NumbersWebhookCampaignNetworkStatus givenCampaignNetworkStatus = NumbersWebhookCampaignNetworkStatus.ACTIVE; + String givenApplicationId = "application-id"; + String givenEntityId = "entity-id"; + + String givenRequest = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"event\": \"CAMPAIGN_NETWORK_STATUS_UPDATE\",\n" + + " \"receivedAt\": \"" + + givenReceivedAtString + + "\",\n" + + " \"content\": {\n" + + " \"campaignId\": \"" + + givenCampaignId + + "\",\n" + + " \"campaignNetwork\": \"VERIZON\",\n" + + " \"campaignNetworkStatus\": \"ACTIVE\"\n" + + " },\n" + + " \"platform\": {\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\"\n" + + " }\n" + + " }\n" + + " ]\n" + + "}\n"; + + NumbersCampaignNetworkStatusWebhookResponse requestBody = + json.deserialize(givenRequest, NumbersCampaignNetworkStatusWebhookResponse.class); + + then(requestBody).isNotNull(); + then(requestBody.getResults()).isNotNull(); + then(requestBody.getResults().size()).isEqualTo(1); + + NumbersCampaignNetworkStatusWebhookMessage message = + requestBody.getResults().get(0); + then(message.getEvent()) + .isEqualTo(NumbersCampaignNetworkStatusWebhookMessage.EventEnum.CAMPAIGN_NETWORK_STATUS_UPDATE); + then(message.getReceivedAt()).isEqualTo(givenReceivedAt); + then(message.getPlatform()).isNotNull(); + then(message.getPlatform().getApplicationId()).isEqualTo(givenApplicationId); + then(message.getPlatform().getEntityId()).isEqualTo(givenEntityId); + + NumbersCampaignNetworkStatusWebhookContent content = message.getContent(); + then(content).isNotNull(); + then(content.getCampaignId()).isEqualTo(givenCampaignId); + then(content.getCampaignNetwork()).isEqualTo(givenCampaignNetwork); + then(content.getCampaignNetworkStatus()).isEqualTo(givenCampaignNetworkStatus); + } + + @Test + void shouldReceiveCampaignStatusUpdate() { + UUID givenCampaignId = UUID.fromString("38a1c2c6-55f2-11ee-a061-325096b39f47"); + String givenReceivedAtString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenReceivedAt = OffsetDateTime.parse(givenReceivedAtString); + NumbersWebhookCampaignStage givenCampaignStatus = NumbersWebhookCampaignStage.REJECTED; + String givenRejectionReasons = "Unable to verify, need website."; + String givenErrorCode = "1001"; + String givenDescription = + "Campaign appears to be for an age gated content type but age gate attribute is not selected."; + String givenRejectionDateString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenRejectionDate = OffsetDateTime.parse(givenRejectionDateString); + String givenApplicationId = "application-id"; + String givenEntityId = "entity-id"; + + String givenRequest = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"event\": \"CAMPAIGN_STATUS_UPDATE\",\n" + + " \"receivedAt\": \"" + + givenReceivedAtString + + "\",\n" + + " \"content\": {\n" + + " \"campaignId\": \"" + + givenCampaignId + + "\",\n" + + " \"campaignStatus\": \"REJECTED\",\n" + + " \"rejectionReasons\": \"" + + givenRejectionReasons + + "\",\n" + + " \"rejectionDetails\": [\n" + + " {\n" + + " \"errorCode\": \"" + + givenErrorCode + + "\",\n" + + " \"description\": \"" + + givenDescription + + "\"\n" + + " }\n" + + " ],\n" + + " \"rejectionDate\": \"" + + givenRejectionDateString + + "\"\n" + + " },\n" + + " \"platform\": {\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\"\n" + + " }\n" + + " }\n" + + " ]\n" + + "}\n"; + + NumbersCampaignStatusWebhookResponse requestBody = + json.deserialize(givenRequest, NumbersCampaignStatusWebhookResponse.class); + + then(requestBody).isNotNull(); + then(requestBody.getResults()).isNotNull(); + then(requestBody.getResults().size()).isEqualTo(1); + + NumbersCampaignStatusWebhookMessage message = requestBody.getResults().get(0); + then(message.getEvent()).isEqualTo(NumbersCampaignStatusWebhookMessage.EventEnum.CAMPAIGN_STATUS_UPDATE); + then(message.getReceivedAt()).isEqualTo(givenReceivedAt); + then(message.getPlatform()).isNotNull(); + then(message.getPlatform().getApplicationId()).isEqualTo(givenApplicationId); + then(message.getPlatform().getEntityId()).isEqualTo(givenEntityId); + + NumbersCampaignStatusWebhookContent content = message.getContent(); + then(content).isNotNull(); + then(content.getCampaignId()).isEqualTo(givenCampaignId); + then(content.getCampaignStatus()).isEqualTo(givenCampaignStatus); + then(content.getRejectionReasons()).isEqualTo(givenRejectionReasons); + then(content.getRejectionDate()).isEqualTo(givenRejectionDate); + then(content.getRejectionDetails()).isNotNull(); + then(content.getRejectionDetails().size()).isEqualTo(1); + NumbersRejectionReasonPayload rejectionDetail = + content.getRejectionDetails().get(0); + then(rejectionDetail.getErrorCode()).isEqualTo(givenErrorCode); + then(rejectionDetail.getDescription()).isEqualTo(givenDescription); + } + + @Test + void shouldGetOwnedNumberPools() { + String givenNumberPoolId1 = "number-pool-identifier-1"; + String givenCampaignId1 = "4d3601ed-c632-4979-ae22-43854ef4ffaf"; + String givenCampaignName1 = "Example name"; + String givenNumberPoolId2 = "number-pool-identifier-2"; + Integer givenPage = 0; + Integer givenSize = 20; + Integer givenTotalPages = 1; + Long givenTotalResults = 2L; + + String givenResponse = String.format( + "{" + + "\"results\":[" + + "{\"numberPoolId\":\"%s\",\"campaignId\":\"%s\",\"campaignName\":\"%s\"}," + + "{\"numberPoolId\":\"%s\"}" + + "]," + + "\"paging\":{\"page\":%d,\"size\":%d,\"totalPages\":%d,\"totalResults\":%d}" + + "}", + givenNumberPoolId1, + givenCampaignId1, + givenCampaignName1, + givenNumberPoolId2, + givenPage, + givenSize, + givenTotalPages, + givenTotalResults); + + setUpSuccessGetRequest(NUMBER_POOLS, Map.of(), givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getOwnedNumberPools(); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getResults()).isNotNull(); + then(response.getResults().size()).isEqualTo(2); + var firstResult = response.getResults().get(0); + then(firstResult.getNumberPoolId()).isEqualTo(givenNumberPoolId1); + then(firstResult.getCampaignId()).isEqualTo(givenCampaignId1); + then(firstResult.getCampaignName()).isEqualTo(givenCampaignName1); + var secondResult = response.getResults().get(1); + then(secondResult.getNumberPoolId()).isEqualTo(givenNumberPoolId2); + then(response.getPaging()).isNotNull(); + then(response.getPaging().getPage()).isEqualTo(givenPage); + then(response.getPaging().getSize()).isEqualTo(givenSize); + then(response.getPaging().getTotalPages()).isEqualTo(givenTotalPages); + then(response.getPaging().getTotalResults()).isEqualTo(givenTotalResults); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUploadDocument() throws IOException { + String givenFileContent = "74AEE8084910ED9207FD67107DE275B43AC04AEEA6"; + UUID givenDocumentId = UUID.fromString("9904751a-9436-4bda-b98a-37b1f7179483"); + String givenDocumentName = "Example document.pdf"; + String givenContentType = "application/pdf"; + Integer givenContentLength = 14956; + + File tempFile = File.createTempFile("document", ".pdf"); + Files.writeString(tempFile.toPath(), givenFileContent); + + String givenResponse = String.format( + "{" + + "\"documentId\":\"%s\"," + + "\"documentName\":\"%s\"," + + "\"contentType\":\"%s\"," + + "\"contentLength\":%d" + + "}", + givenDocumentId, givenDocumentName, givenContentType, givenContentLength); + + setUpMultipartRequest(DOCUMENTS, List.of(new Multipart("document", givenFileContent)), givenResponse, 201); + + NumbersApi api = new NumbersApi(getApiClient()); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getDocumentId()).isEqualTo(givenDocumentId); + then(response.getDocumentName()).isEqualTo(givenDocumentName); + then(response.getContentType()).isEqualTo(givenContentType); + then(response.getContentLength()).isEqualTo(givenContentLength); + }; + + var call = api.uploadDocumentMetadata(tempFile); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDownloadDocument() { + UUID givenDocumentId = UUID.fromString("9904751a-9436-4bda-b98a-37b1f7179483"); + String givenFileContent = "74AEE8084910ED9207FD67107DE275B43AC04AEEA6"; + + setUpGetRequestOctet( + DOCUMENT.replace("{documentId}", givenDocumentId.toString()), Map.of(), givenFileContent, 200); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.downloadDocumentContent(givenDocumentId); + testSuccessfulCallWithFileResult(call::execute); + } + + @Test + void shouldSubmitExistingCampaignForAiReview() { + UUID givenCampaignUuid = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + UUID givenRequestUuid = UUID.fromString("3fa85f64-5717-4562-b3fc-2c963f66afa6"); + + String givenResponse = String.format("{\"requestUuid\":\"%s\"}", givenRequestUuid); + + setUpEmptyPostRequest( + AUTOMATIC_REVIEW_CAMPAIGN.replace("{campaignUuid}", givenCampaignUuid.toString()), + Map.of(), + givenResponse, + 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.submitExistingCampaignForAiReview(givenCampaignUuid); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getRequestUuid()).isEqualTo(givenRequestUuid); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldSubmitCampaignInfoForAiReview() { + String givenOptInMessage = + "Welcome to Example Corp alerts! Msg&data rates may apply. Reply HELP for help, STOP to cancel."; + String givenHelpMessage = + "Example Corp Help: contact support@example.com or call 1-800-555-0100. Msg&data rates may apply."; + String givenOptOutMessage = "You have been unsubscribed from Example Corp alerts. Text START to resubscribe."; + String givenCtaWebsite = "https://www.example.com/opt-in"; + String givenCta1 = "Text JOIN to 12345 to subscribe"; + String givenCta2 = "Visit https://example.com/opt-in to sign up"; + NumbersTenDlcUseCase givenUseCase = NumbersTenDlcUseCase.PROMOTIONAL_MARKETING; + Boolean givenAgeGated = false; + Boolean givenDirectLending = false; + String givenMessageFlow = "Users opt-in via website, receive confirmation messages"; + UUID givenRequestUuid = UUID.fromString("3fa85f64-5717-4562-b3fc-2c963f66afa6"); + + String givenRequest = String.format( + "{" + + "\"optInMessage\":\"%s\"," + + "\"helpMessage\":\"%s\"," + + "\"optOutMessage\":\"%s\"," + + "\"ctaWebsite\":\"%s\"," + + "\"ctas\":[\"%s\",\"%s\"]," + + "\"useCases\":[\"%s\"]," + + "\"ageGated\":%b," + + "\"directLending\":%b," + + "\"messageFlow\":\"%s\"" + + "}", + givenOptInMessage, + givenHelpMessage, + givenOptOutMessage, + givenCtaWebsite, + givenCta1, + givenCta2, + givenUseCase.getValue(), + givenAgeGated, + givenDirectLending, + givenMessageFlow); + + String givenResponse = String.format("{\"requestUuid\":\"%s\"}", givenRequestUuid); + + setUpPostRequest(AUTOMATIC_REVIEW, givenRequest, givenResponse, 202); + + NumbersApi api = new NumbersApi(getApiClient()); + + var request = new NumbersTenDlcAiReviewRequest() + .optInMessage(givenOptInMessage) + .helpMessage(givenHelpMessage) + .optOutMessage(givenOptOutMessage) + .ctaWebsite(givenCtaWebsite) + .ctas(List.of(givenCta1, givenCta2)) + .useCases(List.of(givenUseCase)) + .ageGated(givenAgeGated) + .directLending(givenDirectLending) + .messageFlow(givenMessageFlow); + + var call = api.submitCampaignInfoForAiReview(request); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getRequestUuid()).isEqualTo(givenRequestUuid); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetAiReviewResults() { + UUID givenRequestUuid = UUID.fromString("3fa85f64-5717-4562-b3fc-2c963f66afa6"); + NumbersExternalAutomaticReviewStatus givenReviewStatus = NumbersExternalAutomaticReviewStatus.COMPLIANT; + + String givenResponse = + String.format("{\"reviewStatus\":\"%s\",\"campaignErrors\":[]}", givenReviewStatus.getValue()); + + setUpSuccessGetRequest( + AUTOMATIC_REVIEW_RESULTS.replace("{requestUuid}", givenRequestUuid.toString()), + Map.of(), + givenResponse); + + NumbersApi api = new NumbersApi(getApiClient()); + + var call = api.getAiReviewResults(givenRequestUuid); + + Consumer assertions = response -> { + then(response).isNotNull(); + then(response.getReviewStatus()).isEqualTo(givenReviewStatus); + then(response.getCampaignErrors()).isNotNull(); + then(response.getCampaignErrors()).isEmpty(); + }; + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldReceiveAiCampaignFeedback() { + UUID givenAiCampaignFeedbackRequestUuid = UUID.fromString("f371631b-f204-4488-9393-981fadd088c7"); + String givenReceivedAtString = "2019-08-24T14:15:22Z"; + OffsetDateTime givenReceivedAt = OffsetDateTime.parse(givenReceivedAtString); + String givenApplicationId = "application-id"; + String givenEntityId = "entity-id"; + + String givenRequest = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"event\": \"AI_CAMPAIGN_FEEDBACK\",\n" + + " \"receivedAt\": \"" + + givenReceivedAtString + + "\",\n" + + " \"content\": {\n" + + " \"aiCampaignFeedbackRequestUuid\": \"" + + givenAiCampaignFeedbackRequestUuid + + "\"\n" + + " },\n" + + " \"platform\": {\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\"\n" + + " }\n" + + " }\n" + + " ]\n" + + "}\n"; + + NumbersCampaignAiFeedbackWebhookResponse requestBody = + json.deserialize(givenRequest, NumbersCampaignAiFeedbackWebhookResponse.class); + + then(requestBody).isNotNull(); + then(requestBody.getResults()).isNotNull(); + then(requestBody.getResults().size()).isEqualTo(1); + + NumbersCampaignAiFeedbackWebhookMessage message = + requestBody.getResults().get(0); + then(message.getEvent()).isEqualTo(NumbersCampaignAiFeedbackWebhookMessage.EventEnum.AI_CAMPAIGN_FEEDBACK); + then(message.getReceivedAt()).isEqualTo(givenReceivedAt); + then(message.getPlatform()).isNotNull(); + then(message.getPlatform().getApplicationId()).isEqualTo(givenApplicationId); + then(message.getPlatform().getEntityId()).isEqualTo(givenEntityId); + + NumbersCampaignAiFeedbackWebhookContent content = message.getContent(); + then(content).isNotNull(); + then(content.getAiCampaignFeedbackRequestUuid()).isEqualTo(givenAiCampaignFeedbackRequestUuid); + } +} diff --git a/src/test/java/com/infobip/api/RcsApiTest.java b/src/test/java/com/infobip/api/RcsApiTest.java index 3d66f19..f142c7d 100644 --- a/src/test/java/com/infobip/api/RcsApiTest.java +++ b/src/test/java/com/infobip/api/RcsApiTest.java @@ -805,32 +805,36 @@ void shouldParseRcsInboundTextMessage() { @Test void shouldParseRcsUserActionEvent() { - String givenEntityId = "c0ed295b-c39d-4f6d-b347-fa1837f18c00"; - String givenApplicationId = "21901"; - String givenSender = "DemoSender"; - String givenTo = "441134960001"; + String givenCampaignReferenceId = "CAMP-2026-Q1"; + String givenSender = "+385911234567"; + String givenTo = "+385911111111"; String givenIntegrationType = "RCS"; - String givenReceivedAt = "2024-06-14T09:12:00.000+0000"; - String givenKeyword = "someKeyword"; - String givenMessageId = "c0ed295b-c39d-4f6d-b347-fa1837f18c00"; - String givenPairedMessageId = "29ee2440-5461-4b04-bc81-3f6aa630ffa7"; - String givenCallbackData = "someCallbackData"; + String givenReceivedAt = "2026-03-03T14:22:30.000+0000"; + String givenInteractionType = "EVENT"; + String givenKeyword = "START"; + String givenMessageId = "msg-abc123"; + String givenPairedMessageId = "msg-xyz456"; + String givenCallbackData = "custom-user-data"; String givenSuggestionText = "suggestionText"; String givenPostbackData = "suggestionPostbackData"; double givenPricePerMessage = 0; String givenCurrency = "EUR"; + boolean givenConversationCanInitiate = false; + String givenConversationId = "conv-xyz789"; + String givenApplicationId = "ext-app-001"; + String givenEntityId = "ext-entity-001"; int givenMessageCount = 1; int givenPendingMessageCount = 0; String givenRequest = String.format( "{\n" + " \"results\": [\n" + " {\n" - + " \"entityId\": \"%s\",\n" - + " \"applicationId\": \"%s\",\n" + + " \"campaignReferenceId\": \"%s\",\n" + " \"sender\": \"%s\",\n" + " \"to\": \"%s\",\n" + " \"integrationType\": \"%s\",\n" + " \"receivedAt\": \"%s\",\n" + + " \"interactionType\": \"%s\",\n" + " \"keyword\": \"%s\",\n" + " \"messageId\": \"%s\",\n" + " \"pairedMessageId\": \"%s\",\n" @@ -843,18 +847,26 @@ void shouldParseRcsUserActionEvent() { + " \"price\": {\n" + " \"pricePerMessage\": %.0f,\n" + " \"currency\": \"%s\"\n" + + " },\n" + + " \"conversation\": {\n" + + " \"canInitiate\": %b,\n" + + " \"id\": \"%s\"\n" + + " },\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + " }\n" + " }\n" + " ],\n" + " \"messageCount\": %d,\n" + " \"pendingMessageCount\": %d\n" + "}", - givenEntityId, - givenApplicationId, + givenCampaignReferenceId, givenSender, givenTo, givenIntegrationType, givenReceivedAt, + givenInteractionType, givenKeyword, givenMessageId, givenPairedMessageId, @@ -863,6 +875,10 @@ void shouldParseRcsUserActionEvent() { givenPostbackData, givenPricePerMessage, givenCurrency, + givenConversationCanInitiate, + givenConversationId, + givenApplicationId, + givenEntityId, givenMessageCount, givenPendingMessageCount); @@ -874,11 +890,11 @@ void shouldParseRcsUserActionEvent() { then(result.getResults()).isNotNull(); then(result.getResults().size()).isEqualTo(1); var event = result.getResults().get(0); - then(event.getEntityId()).isEqualTo(givenEntityId); - then(event.getApplicationId()).isEqualTo(givenApplicationId); + then(event.getCampaignReferenceId()).isEqualTo(givenCampaignReferenceId); then(event.getSender()).isEqualTo(givenSender); then(event.getTo()).isEqualTo(givenTo); then(event.getIntegrationType()).isEqualTo(givenIntegrationType); + then(event.getInteractionType()).isEqualTo(RcsEventInteractionType.EVENT); then(event.getKeyword()).isEqualTo(givenKeyword); then(event.getMessageId()).isEqualTo(givenMessageId); then(event.getPairedMessageId()).isEqualTo(givenPairedMessageId); @@ -886,11 +902,20 @@ void shouldParseRcsUserActionEvent() { var content = event.getMessage(); then(content).isNotNull(); then(content).isInstanceOf(RcsInboundSuggestionContent.class); - then(content.getType()).isEqualTo(RcsInboundMessageContentType.SUGGESTION); + then(((RcsInboundSuggestionContent) content).getText()).isEqualTo(givenSuggestionText); + then(((RcsInboundSuggestionContent) content).getPostbackData()).isEqualTo(givenPostbackData); var price = event.getPrice(); then(price).isNotNull(); then(price.getPricePerMessage()).isEqualTo(givenPricePerMessage); then(price.getCurrency()).isEqualTo(givenCurrency); + var conversation = event.getConversation(); + then(conversation).isNotNull(); + then(conversation.getCanInitiate()).isEqualTo(givenConversationCanInitiate); + then(conversation.getId()).isEqualTo(givenConversationId); + var platform = event.getPlatform(); + then(platform).isNotNull(); + then(platform.getApplicationId()).isEqualTo(givenApplicationId); + then(platform.getEntityId()).isEqualTo(givenEntityId); } @Test @@ -1314,4 +1339,78 @@ void shouldParseRcsTypingIndicatorEvent() { then(eventContent).isNotNull(); then(eventContent.getType()).isEqualTo(RcsIsTypingEventType.TYPING_INDICATOR); } + + @Test + void shouldReceiveRcsConversationStartedEvent() { + String givenMessageId = "msg-abc123"; + String givenTrafficType = "A2P_CONVERSATION"; + String givenEventType = "CONVERSATION_STARTED"; + String givenConversationType = "A2P"; + String givenConversationId = "conv-xyz789"; + String givenStartTime = "2026-06-14T09:12:00.000+0000"; + String givenEndTime = "2026-06-15T09:12:00.000+0000"; + String givenEntityId = "ext-entity-001"; + String givenApplicationId = "ext-app-001"; + int givenEventCount = 1; + int givenPendingEventCount = 0; + + String givenRequest = String.format( + "{\n" + " \"results\": [\n" + + " {\n" + + " \"messageId\": \"%s\",\n" + + " \"trafficType\": \"%s\",\n" + + " \"event\": {\n" + + " \"type\": \"%s\"\n" + + " },\n" + + " \"conversation\": {\n" + + " \"type\": \"%s\",\n" + + " \"id\": \"%s\",\n" + + " \"startTime\": \"%s\",\n" + + " \"endTime\": \"%s\"\n" + + " },\n" + + " \"platform\": {\n" + + " \"entityId\": \"%s\",\n" + + " \"applicationId\": \"%s\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"eventCount\": %d,\n" + + " \"pendingEventCount\": %d\n" + + "}", + givenMessageId, + givenTrafficType, + givenEventType, + givenConversationType, + givenConversationId, + givenStartTime, + givenEndTime, + givenEntityId, + givenApplicationId, + givenEventCount, + givenPendingEventCount); + + RcsConversationStartedEvents result = new JSON().deserialize(givenRequest, RcsConversationStartedEvents.class); + + then(result).isNotNull(); + then(result.getEventCount()).isEqualTo(givenEventCount); + then(result.getPendingEventCount()).isEqualTo(givenPendingEventCount); + then(result.getResults()).isNotNull(); + then(result.getResults().size()).isEqualTo(1); + var event = result.getResults().get(0); + then(event.getMessageId()).isEqualTo(givenMessageId); + then(event.getTrafficType()).isEqualTo(RcsTrafficType.A2P_CONVERSATION); + var eventContent = event.getEvent(); + then(eventContent).isNotNull(); + then(eventContent.getType()).isEqualTo(RcsConversationStartedEventType.STARTED); + var conversation = event.getConversation(); + then(conversation).isNotNull(); + then(conversation.getType()).isEqualTo(RcsConversationType.A2P); + then(conversation.getId()).isEqualTo(givenConversationId); + then(conversation.getStartTime()).isEqualTo(OffsetDateTime.of(2026, 6, 14, 9, 12, 0, 0, ZoneOffset.ofHours(0))); + then(conversation.getEndTime()).isEqualTo(OffsetDateTime.of(2026, 6, 15, 9, 12, 0, 0, ZoneOffset.ofHours(0))); + var platform = event.getPlatform(); + then(platform).isNotNull(); + then(platform.getEntityId()).isEqualTo(givenEntityId); + then(platform.getApplicationId()).isEqualTo(givenApplicationId); + } } diff --git a/src/test/java/com/infobip/api/ResourcesApiTest.java b/src/test/java/com/infobip/api/ResourcesApiTest.java new file mode 100644 index 0000000..98b9e39 --- /dev/null +++ b/src/test/java/com/infobip/api/ResourcesApiTest.java @@ -0,0 +1,1528 @@ +package com.infobip.api; + +import static org.assertj.core.api.BDDAssertions.then; + +import com.infobip.JSON; +import com.infobip.model.*; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.function.Consumer; +import org.junit.jupiter.api.Test; + +class ResourcesApiTest extends ApiTest { + + private static final String RESOURCES = "/resources/1/resources"; + private static final String COVERAGE_LOOKUP = "/resources/1/coverage-lookup"; + private static final String REQUIREMENTS_LOOKUP = "/resources/1/requirements-lookup"; + private static final String RESOURCE_REQUESTS = "/resources/1/requests"; + private static final String RESOURCE_REQUEST = "/resources/1/requests/{id}"; + private static final String CANCEL_RESOURCE_REQUEST = "/resources/1/requests/{id}/cancel"; + private static final String DOCUMENTS = "/resources/1/documents"; + private static final String DOCUMENT = "/resources/1/documents/{documentId}"; + private static final String INBOUND_CONFIGURATIONS = "/resource-management/1/inbound-message-configurations"; + private static final String INBOUND_CONFIGURATION = + "/resource-management/1/inbound-message-configurations/{configurationKey}"; + + @Test + void shouldGetInboundConfigurations() { + String givenConfigurationKey = "58BC6DB7966CB9F69A91EB956DF73239"; + String givenNumber = "41793026727"; + String givenNumberKey = "58BC6DB7966CB9F69A91EB956DF73239"; + String givenResource = "41793026727"; + String givenResourceKey = "58BC6DB7966CB9F69A91EB956DF73239"; + String givenKeyword = "STARTKW"; + ResourcesConfigurationType givenChannel = ResourcesConfigurationType.SMS; + String givenCountryCode = "GB"; + + String givenResponseConfigurationKey = "E9FCDCA496035F08EEA5933702EDF745"; + String givenResponseKeyword = "STARTKW"; + String givenUsername = "myusername"; + String givenApplicationId = "myApplicationId"; + String givenEntityId = "myEntityId"; + MoActionType givenForwardingType = MoActionType.PULL; + String givenAutoResponseMessage = "Thank you for your message."; + String givenAutoResponseSender = "MyAutoResponseSender"; + String givenDeliveryFrom = "08:35"; + String givenDeliveryTo = "16:35"; + ResourcesDeliveryTimeZoneResponse givenDeliveryTimeZone = ResourcesDeliveryTimeZoneResponse.USER_TIME_ZONE; + ResourcesBlockListConfigurationType givenBlockListType = ResourcesBlockListConfigurationType.UNBLOCK; + ResourcesBlockLevelResponse givenBlockLevel = ResourcesBlockLevelResponse.FROM_SENDER; + + String givenResponse = String.format( + "[\n" + + " {\n" + + " \"configurationKey\": \"%s\",\n" + + " \"channel\": \"%s\",\n" + + " \"keyword\": \"%s\",\n" + + " \"username\": \"%s\",\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + + " },\n" + + " \"forwarding\": {\n" + + " \"type\": \"%s\"\n" + + " },\n" + + " \"conversations\": {\n" + + " \"enabled\": true\n" + + " },\n" + + " \"answers\": {\n" + + " \"enabled\": true\n" + + " },\n" + + " \"autoResponse\": {\n" + + " \"message\": \"%s\",\n" + + " \"sender\": \"%s\",\n" + + " \"deliveryTimeWindow\": {\n" + + " \"from\": \"%s\",\n" + + " \"to\": \"%s\",\n" + + " \"days\": [\"MONDAY\", \"TUESDAY\", \"WEDNESDAY\", \"THURSDAY\", \"FRIDAY\"],\n" + + " \"deliveryTimeZone\": \"%s\"\n" + + " }\n" + + " },\n" + + " \"blockListConfiguration\": {\n" + + " \"type\": \"%s\",\n" + + " \"level\": \"%s\"\n" + + " }\n" + + " }\n" + + "]", + givenResponseConfigurationKey, + givenChannel, + givenResponseKeyword, + givenUsername, + givenApplicationId, + givenEntityId, + givenForwardingType, + givenAutoResponseMessage, + givenAutoResponseSender, + givenDeliveryFrom, + givenDeliveryTo, + givenDeliveryTimeZone, + givenBlockListType, + givenBlockLevel); + + setUpSuccessGetRequest( + INBOUND_CONFIGURATIONS, + Map.of( + "configurationKey", givenConfigurationKey, + "number", givenNumber, + "numberKey", givenNumberKey, + "resource", givenResource, + "resourceKey", givenResourceKey, + "keyword", givenKeyword, + "channel", givenChannel.getValue(), + "countryCode", givenCountryCode), + givenResponse); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + Consumer> assertions = (response) -> { + then(response).isNotNull(); + then(response).hasSize(1); + + ResourcesMoConfigurationResponse config = response.get(0); + then(config.getConfigurationKey()).isEqualTo(givenResponseConfigurationKey); + then(config.getChannel()).isEqualTo(givenChannel); + then(config.getKeyword()).isEqualTo(givenResponseKeyword); + then(config.getUsername()).isEqualTo(givenUsername); + + ResourcesPlatformDocs platform = config.getPlatform(); + then(platform).isNotNull(); + then(platform.getApplicationId()).isEqualTo(givenApplicationId); + then(platform.getEntityId()).isEqualTo(givenEntityId); + + ResourcesMoActionDocs forwarding = config.getForwarding(); + then(forwarding).isNotNull(); + then(forwarding.getType()).isEqualTo(givenForwardingType); + + then(config.getConversations()).isNotNull(); + then(config.getConversations().getEnabled()).isTrue(); + + then(config.getAnswers()).isNotNull(); + then(config.getAnswers().getEnabled()).isTrue(); + + ResourcesAutoResponseActionResponse autoResponse = config.getAutoResponse(); + then(autoResponse).isNotNull(); + then(autoResponse.getMessage()).isEqualTo(givenAutoResponseMessage); + then(autoResponse.getSender()).isEqualTo(givenAutoResponseSender); + + ResourcesDeliveryTimeWindowResponse deliveryTimeWindow = autoResponse.getDeliveryTimeWindow(); + then(deliveryTimeWindow).isNotNull(); + then(deliveryTimeWindow.getFrom()).isEqualTo(givenDeliveryFrom); + then(deliveryTimeWindow.getTo()).isEqualTo(givenDeliveryTo); + then(deliveryTimeWindow.getDays()) + .isEqualTo(Set.of( + ResourcesDayOfWeek.MONDAY, + ResourcesDayOfWeek.TUESDAY, + ResourcesDayOfWeek.WEDNESDAY, + ResourcesDayOfWeek.THURSDAY, + ResourcesDayOfWeek.FRIDAY)); + then(deliveryTimeWindow.getDeliveryTimeZone()).isEqualTo(givenDeliveryTimeZone); + + ResourcesBlockListConfigurationResponse blockList = config.getBlockListConfiguration(); + then(blockList).isNotNull(); + then(blockList.getType()).isEqualTo(givenBlockListType); + then(blockList.getLevel()).isEqualTo(givenBlockLevel); + }; + + var call = api.getInboundConfigurations(givenChannel) + .configurationKey(givenConfigurationKey) + .number(givenNumber) + .numberKey(givenNumberKey) + .resource(givenResource) + .resourceKey(givenResourceKey) + .keyword(givenKeyword) + .countryCode(givenCountryCode); + + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldManageInboundConfiguration() { + String givenKeyword = "STARTKW"; + String givenUsername = "myusername"; + ResourcesUnsetOption givenUnset = ResourcesUnsetOption.FORWARDING; + String givenNumberKey = "58BC6DB7966CB9F69A91EB956DF73239"; + String givenApplicationId = "myApplicationId"; + String givenEntityId = "myEntityId"; + String givenNumber = "41793026727"; + String givenCountryCode = "GB"; + MoActionType givenForwardingType = MoActionType.PULL; + String givenAutoResponseMessage = "Thank you for your message."; + String givenAutoResponseSender = "MyAutoResponseSender"; + String givenDeliveryFrom = "08:35"; + String givenDeliveryTo = "16:35"; + ResourcesDeliveryTimeZone givenDeliveryTimeZone = ResourcesDeliveryTimeZone.USER_TIME_ZONE; + ResourcesBlockListConfigurationType givenBlockListType = ResourcesBlockListConfigurationType.UNBLOCK; + ResourcesBlockLevelRequest givenBlockLevel = ResourcesBlockLevelRequest.SENDER; + + String givenResponseConfigurationKey = "E9FCDCA496035F08EEA5933702EDF745"; + ResourcesConfigurationType givenChannel = ResourcesConfigurationType.SMS; + ResourcesDeliveryTimeZoneResponse givenResponseDeliveryTimeZone = + ResourcesDeliveryTimeZoneResponse.USER_TIME_ZONE; + ResourcesBlockLevelResponse givenResponseBlockLevel = ResourcesBlockLevelResponse.FROM_SENDER; + + String expectedRequest = String.format( + "{\n" + + " \"keyword\": \"%s\",\n" + + " \"username\": \"%s\",\n" + + " \"unset\": [\"%s\"],\n" + + " \"channel\": \"%s\",\n" + + " \"numberKey\": \"%s\",\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + + " },\n" + + " \"number\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"forwarding\": {\n" + + " \"type\": \"%s\"\n" + + " },\n" + + " \"conversations\": {\n" + + " \"enabled\": true\n" + + " },\n" + + " \"autoResponse\": {\n" + + " \"message\": \"%s\",\n" + + " \"sender\": \"%s\",\n" + + " \"deliveryTimeWindow\": {\n" + + " \"from\": \"%s\",\n" + + " \"to\": \"%s\",\n" + + " \"days\": [\"MONDAY\", \"TUESDAY\", \"WEDNESDAY\", \"THURSDAY\", \"FRIDAY\"],\n" + + " \"deliveryTimeZone\": \"%s\"\n" + + " }\n" + + " },\n" + + " \"blockListConfiguration\": {\n" + + " \"type\": \"%s\",\n" + + " \"level\": \"%s\"\n" + + " }\n" + + "}", + givenKeyword, + givenUsername, + givenUnset, + givenChannel, + givenNumberKey, + givenApplicationId, + givenEntityId, + givenNumber, + givenCountryCode, + givenForwardingType, + givenAutoResponseMessage, + givenAutoResponseSender, + givenDeliveryFrom, + givenDeliveryTo, + givenDeliveryTimeZone, + givenBlockListType, + givenBlockLevel); + + String givenResponse = String.format( + "{\n" + + " \"configurationKey\": \"%s\",\n" + + " \"channel\": \"%s\",\n" + + " \"keyword\": \"%s\",\n" + + " \"username\": \"%s\",\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + + " },\n" + + " \"forwarding\": {\n" + + " \"type\": \"%s\"\n" + + " },\n" + + " \"conversations\": {\n" + + " \"enabled\": true\n" + + " },\n" + + " \"answers\": {\n" + + " \"enabled\": true\n" + + " },\n" + + " \"autoResponse\": {\n" + + " \"message\": \"%s\",\n" + + " \"sender\": \"%s\",\n" + + " \"deliveryTimeWindow\": {\n" + + " \"from\": \"%s\",\n" + + " \"to\": \"%s\",\n" + + " \"days\": [\"MONDAY\", \"TUESDAY\", \"WEDNESDAY\", \"THURSDAY\", \"FRIDAY\"],\n" + + " \"deliveryTimeZone\": \"%s\"\n" + + " }\n" + + " },\n" + + " \"blockListConfiguration\": {\n" + + " \"type\": \"%s\",\n" + + " \"level\": \"%s\"\n" + + " }\n" + + "}", + givenResponseConfigurationKey, + givenChannel, + givenKeyword, + givenUsername, + givenApplicationId, + givenEntityId, + givenForwardingType, + givenAutoResponseMessage, + givenAutoResponseSender, + givenDeliveryFrom, + givenDeliveryTo, + givenResponseDeliveryTimeZone, + givenBlockListType, + givenResponseBlockLevel); + + setUpSuccessPostRequest(INBOUND_CONFIGURATIONS, expectedRequest, givenResponse); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + Set givenDays = new LinkedHashSet<>(); + givenDays.add(ResourcesDayOfWeek.MONDAY); + givenDays.add(ResourcesDayOfWeek.TUESDAY); + givenDays.add(ResourcesDayOfWeek.WEDNESDAY); + givenDays.add(ResourcesDayOfWeek.THURSDAY); + givenDays.add(ResourcesDayOfWeek.FRIDAY); + + ResourcesMoConfigurationRequest request = new ResourcesSmsMoConfigurationRequest() + .numberKey(givenNumberKey) + .platform(new ResourcesPlatformDocs() + .applicationId(givenApplicationId) + .entityId(givenEntityId)) + .number(givenNumber) + .countryCode(givenCountryCode) + .forwarding(new ResourcesPullActionDocs()) + .conversations(new ResourcesUseConversations().enabled(true)) + .autoResponse(new ResourcesAutoResponseActionRequest() + .message(givenAutoResponseMessage) + .sender(givenAutoResponseSender) + .deliveryTimeWindow(new ResourcesDeliveryTimeWindow() + .from(givenDeliveryFrom) + .to(givenDeliveryTo) + .days(givenDays) + .deliveryTimeZone(givenDeliveryTimeZone))) + .blockListConfiguration(new ResourcesBlockListConfigurationRequest() + .type(givenBlockListType) + .level(givenBlockLevel)) + .keyword(givenKeyword) + .username(givenUsername) + .unset(Set.of(givenUnset)); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + then(response.getConfigurationKey()).isEqualTo(givenResponseConfigurationKey); + then(response.getChannel()).isEqualTo(givenChannel); + then(response.getKeyword()).isEqualTo(givenKeyword); + then(response.getUsername()).isEqualTo(givenUsername); + + ResourcesPlatformDocs platform = response.getPlatform(); + then(platform).isNotNull(); + then(platform.getApplicationId()).isEqualTo(givenApplicationId); + then(platform.getEntityId()).isEqualTo(givenEntityId); + + ResourcesMoActionDocs forwarding = response.getForwarding(); + then(forwarding).isNotNull(); + then(forwarding.getType()).isEqualTo(givenForwardingType); + + then(response.getConversations()).isNotNull(); + then(response.getConversations().getEnabled()).isTrue(); + + then(response.getAnswers()).isNotNull(); + then(response.getAnswers().getEnabled()).isTrue(); + + ResourcesAutoResponseActionResponse autoResponse = response.getAutoResponse(); + then(autoResponse).isNotNull(); + then(autoResponse.getMessage()).isEqualTo(givenAutoResponseMessage); + then(autoResponse.getSender()).isEqualTo(givenAutoResponseSender); + + ResourcesDeliveryTimeWindowResponse deliveryTimeWindow = autoResponse.getDeliveryTimeWindow(); + then(deliveryTimeWindow).isNotNull(); + then(deliveryTimeWindow.getFrom()).isEqualTo(givenDeliveryFrom); + then(deliveryTimeWindow.getTo()).isEqualTo(givenDeliveryTo); + then(deliveryTimeWindow.getDays()).isEqualTo(givenDays); + then(deliveryTimeWindow.getDeliveryTimeZone()).isEqualTo(givenResponseDeliveryTimeZone); + + ResourcesBlockListConfigurationResponse blockList = response.getBlockListConfiguration(); + then(blockList).isNotNull(); + then(blockList.getType()).isEqualTo(givenBlockListType); + then(blockList.getLevel()).isEqualTo(givenResponseBlockLevel); + }; + + var call = api.manageInboundConfiguration(request); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDeleteInboundConfiguration() { + String givenConfigurationKey = "58BC6DB7966CB9F69A91EB956DF73239"; + + setUpNoResponseBodyDeleteRequest( + INBOUND_CONFIGURATION.replace("{configurationKey}", givenConfigurationKey), Map.of(), 204); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + var call = api.deleteInboundConfiguration(givenConfigurationKey); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldSearchResources() { + String givenNumber = "447860041117"; + String givenCountryCode = "GB"; + ResourcesIbResourceType givenResourceType = ResourcesIbResourceType.NUMBER; + ResourcesNumberResourceCapabilityChannelDocs givenRequestCapability = + ResourcesNumberResourceCapabilityChannelDocs.SMS; + + String givenNumberKey = "58B3840032C7774BAC840EEEA2C23A44"; + String givenApplicationId = "myApplicationId"; + String givenEntityId = "myEntityId"; + ResourcesNumberTypeResourceMoDocs givenNumberType = ResourcesNumberTypeResourceMoDocs.VIRTUAL_LONG_NUMBER; + String givenCountryName = "United Kingdom"; + ResourcesResourceCapabilityChannel givenResponseCapability = ResourcesResourceCapabilityChannel.SMS; + int givenPage = 0; + int givenSize = 1; + int givenTotalPages = 1; + long givenTotalResults = 1L; + + String expectedRequest = String.format( + "{\n" + + " \"resourceType\": \"%s\",\n" + + " \"number\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"capabilities\": [\"%s\"]\n" + + "}", + givenResourceType, givenNumber, givenCountryCode, givenRequestCapability); + + String givenResponse = String.format( + "{\n" + + " \"results\": [\n" + + " {\n" + + " \"number\": \"%s\",\n" + + " \"numberKey\": \"%s\",\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + + " },\n" + + " \"numberType\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"countryName\": \"%s\",\n" + + " \"capabilities\": [\"%s\"],\n" + + " \"resourceType\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"paging\": {\n" + + " \"page\": %d,\n" + + " \"size\": %d,\n" + + " \"totalPages\": %d,\n" + + " \"totalResults\": %d\n" + + " }\n" + + "}", + givenNumber, + givenNumberKey, + givenApplicationId, + givenEntityId, + givenNumberType, + givenCountryCode, + givenCountryName, + givenResponseCapability, + givenResourceType, + givenPage, + givenSize, + givenTotalPages, + givenTotalResults); + + setUpSuccessPostRequest(RESOURCES, expectedRequest, givenResponse); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + ResourcesIbResourcesFilter filter = new ResourcesNumberResourceFilter() + .number(givenNumber) + .countryCode(givenCountryCode) + .capabilities(List.of(givenRequestCapability)); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + + List results = response.getResults(); + then(results).isNotNull(); + then(results).hasSize(1); + + ResourcesNumberResourceInfo result = (ResourcesNumberResourceInfo) results.get(0); + then(result.getNumber()).isEqualTo(givenNumber); + then(result.getNumberKey()).isEqualTo(givenNumberKey); + then(result.getNumberType()).isEqualTo(givenNumberType); + then(result.getCountryCode()).isEqualTo(givenCountryCode); + then(result.getCountryName()).isEqualTo(givenCountryName); + then(result.getResourceType()).isEqualTo(givenResourceType); + then(result.getCapabilities()).isEqualTo(Set.of(givenResponseCapability)); + + ResourcesPlatformDocs platform = result.getPlatform(); + then(platform).isNotNull(); + then(platform.getApplicationId()).isEqualTo(givenApplicationId); + then(platform.getEntityId()).isEqualTo(givenEntityId); + + PageInfo paging = response.getPaging(); + then(paging).isNotNull(); + then(paging.getPage()).isEqualTo(givenPage); + then(paging.getSize()).isEqualTo(givenSize); + then(paging.getTotalPages()).isEqualTo(givenTotalPages); + then(paging.getTotalResults()).isEqualTo(givenTotalResults); + }; + + var call = api.listResources(filter); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldLookupResourceCoverage() { + String givenSenderName = "MySender"; + String givenCountryCode = "GB"; + ResourcesIbResourceType givenResourceType = ResourcesIbResourceType.ALPHANUMERIC; + + String givenCountryName = "United Kingdom"; + String givenMccNnc = "310260"; + String givenNetworkName = "Some network"; + ResourcesResourceCapabilityChannel givenChannel = ResourcesResourceCapabilityChannel.SMS; + + String expectedRequest = String.format( + "{\n" + + " \"resourceType\": \"%s\",\n" + + " \"senderName\": \"%s\",\n" + + " \"countryCode\": \"%s\"\n" + + "}", + givenResourceType, givenSenderName, givenCountryCode); + + String givenResponse = String.format( + "{\n" + + " \"senderName\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"countryName\": \"%s\",\n" + + " \"capabilities\": [\n" + + " {\n" + + " \"channel\": \"%s\",\n" + + " \"coverage\": {\n" + + " \"outbound\": [\n" + + " {\n" + + " \"mccNnc\": \"%s\",\n" + + " \"networkName\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"inbound\": false\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"resourceType\": \"%s\"\n" + + "}", + givenSenderName, + givenCountryCode, + givenCountryName, + givenChannel, + givenMccNnc, + givenNetworkName, + givenResourceType); + + setUpSuccessPostRequest(COVERAGE_LOOKUP, expectedRequest, givenResponse); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + ResourcesIbResourceCoverageKey coverageKey = + new ResourcesAlphaCoverageKey().senderName(givenSenderName).countryCode(givenCountryCode); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + + ResourcesAlphaCoverageInfo alphaCoverageInfo = (ResourcesAlphaCoverageInfo) response; + then(alphaCoverageInfo.getSenderName()).isEqualTo(givenSenderName); + then(alphaCoverageInfo.getCountryCode()).isEqualTo(givenCountryCode); + then(alphaCoverageInfo.getCountryName()).isEqualTo(givenCountryName); + then(alphaCoverageInfo.getResourceType()).isEqualTo(givenResourceType); + + Set capabilities = alphaCoverageInfo.getCapabilities(); + then(capabilities).isNotNull(); + then(capabilities).hasSize(1); + + ResourcesIbResourceCapability capability = capabilities.iterator().next(); + then(capability.getChannel()).isEqualTo(givenChannel); + + ResourcesIbResourceCoverage coverage = capability.getCoverage(); + then(coverage).isNotNull(); + then(coverage.getInbound()).isFalse(); + + Set outbound = coverage.getOutbound(); + then(outbound).isNotNull(); + then(outbound).hasSize(1); + + ResourcesNetworkView network = outbound.iterator().next(); + then(network.getMccNnc()).isEqualTo(givenMccNnc); + then(network.getNetworkName()).isEqualTo(givenNetworkName); + }; + + var call = api.lookupResourceCoverage(coverageKey); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetResourceRequirements() { + String givenType = "NUMBER_PURCHASE"; + int givenQuantity = 1; + String givenNumberType = "TEN_DIGIT_LONG_CODE"; + String givenCountryCode = "US"; + ResourcesResourceNumberCapability givenCapabilitySms = ResourcesResourceNumberCapability.SMS; + ResourcesResourceNumberCapability givenCapabilityVoice = ResourcesResourceNumberCapability.VOICE; + + String givenCompanyNameKey = "companyName"; + String givenCompanyNameName = "Company Name"; + String givenCompanyNameDescription = "The name of the company."; + ResourcesCategory givenCompanyNameCategory = ResourcesCategory.BUSINESS_DETAILS; + int givenCompanyNameMinLength = 3; + int givenCompanyNameMaxLength = 30; + String givenCompanyNamePattern = "^[a-zA-Z0-9]+$"; + + String givenMonthlyCallsKey = "monthlyCallsVolume"; + String givenMonthlyCallsName = "Monthly Calls Volume"; + String givenMonthlyCallsDescription = "Monthly volume of calls."; + ResourcesCategory givenMonthlyCallsCategory = ResourcesCategory.USE_CASE_DETAILS; + String givenMonthlyCallsOption1 = "Up to 1000 calls"; + String givenMonthlyCallsOption2 = "1000 - 10000 calls"; + String givenMonthlyCallsOption3 = "More than 10000 calls"; + + String givenFoundedYearKey = "companyFoundedYear"; + String givenFoundedYearName = "Company Founded Year"; + String givenFoundedYearDescription = "Founded year of company."; + ResourcesCategory givenFoundedYearCategory = ResourcesCategory.BUSINESS_DETAILS; + int givenFoundedYearMinValue = 1900; + int givenFoundedYearMaxValue = 2025; + + String givenEmailKey = "companyEmailAddresses"; + String givenEmailName = "Company Email Addresses"; + String givenEmailDescription = "Additional emails of the company."; + ResourcesCategory givenEmailCategory = ResourcesCategory.BUSINESS_DETAILS; + + String givenWebsiteKey = "companyWebsite"; + String givenWebsiteName = "Company Website"; + String givenWebsiteDescription = "The website of the company."; + ResourcesCategory givenWebsiteCategory = ResourcesCategory.BUSINESS_DETAILS; + + String givenPhoneKey = "phoneNumber"; + String givenPhoneName = "Phone Number"; + String givenPhoneDescription = "The phone number of the company."; + ResourcesCategory givenPhoneCategory = ResourcesCategory.CONTACT_INFORMATION; + + String givenRegDocKey = "companyRegistrationDocument"; + String givenRegDocName = "Company Registration Document"; + String givenRegDocDescription = "The document that proves the registration of the company."; + ResourcesCategory givenRegDocCategory = ResourcesCategory.BUSINESS_DETAILS; + + String givenAddInfoKey = "additionalInformation"; + String givenAddInfoName = "Additional Information"; + String givenAddInfoDescription = + "Additional information that need to be provided by filling document and uploading it. Used for testing DO NOT MODIFY IT"; + ResourcesCategory givenAddInfoCategory = ResourcesCategory.OTHER; + String givenAddInfoDocumentId = + "103AFCC51DC08FDD351D6ACB689FA0711AC0054C882E46DD6316C695FD00B6E12EB107C95F4401F3B4611F431B22A5538D40494D62FA30D7647AFB577480540A"; + ResourcesDocumentType givenAddInfoDocumentType = ResourcesDocumentType.TEMPLATE; + + String expectedRequest = String.format( + "{\n" + + " \"type\": \"%s\",\n" + + " \"quantity\": %d,\n" + + " \"numberType\": \"%s\",\n" + + " \"capabilities\": [\"%s\", \"%s\"],\n" + + " \"countryCode\": \"%s\"\n" + + "}", + givenType, givenQuantity, givenNumberType, givenCapabilitySms, givenCapabilityVoice, givenCountryCode); + + String givenResponse = String.format( + "{\n" + + " \"requirements\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"type\": \"TEXT\",\n" + + " \"name\": \"%s\",\n" + + " \"description\": \"%s\",\n" + + " \"category\": \"%s\",\n" + + " \"required\": true,\n" + + " \"validation\": {\n" + + " \"minLength\": %d,\n" + + " \"maxLength\": %d,\n" + + " \"pattern\": \"%s\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"type\": \"TEXT\",\n" + + " \"name\": \"%s\",\n" + + " \"options\": [\"%s\", \"%s\", \"%s\"],\n" + + " \"description\": \"%s\",\n" + + " \"category\": \"%s\",\n" + + " \"required\": true\n" + + " },\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"type\": \"INTEGER\",\n" + + " \"name\": \"%s\",\n" + + " \"description\": \"%s\",\n" + + " \"category\": \"%s\",\n" + + " \"required\": true,\n" + + " \"validation\": {\n" + + " \"minValue\": %d,\n" + + " \"maxValue\": %d\n" + + " }\n" + + " },\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"type\": \"EMAIL\",\n" + + " \"name\": \"%s\",\n" + + " \"description\": \"%s\",\n" + + " \"category\": \"%s\",\n" + + " \"required\": false,\n" + + " \"multipleValuesSupported\": true\n" + + " },\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"type\": \"URL\",\n" + + " \"name\": \"%s\",\n" + + " \"description\": \"%s\",\n" + + " \"category\": \"%s\",\n" + + " \"required\": true\n" + + " },\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"type\": \"GSM\",\n" + + " \"name\": \"%s\",\n" + + " \"description\": \"%s\",\n" + + " \"category\": \"%s\",\n" + + " \"required\": true\n" + + " },\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"type\": \"DOCUMENT\",\n" + + " \"name\": \"%s\",\n" + + " \"description\": \"%s\",\n" + + " \"category\": \"%s\",\n" + + " \"required\": true\n" + + " },\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"type\": \"DOCUMENT\",\n" + + " \"name\": \"%s\",\n" + + " \"description\": \"%s\",\n" + + " \"category\": \"%s\",\n" + + " \"required\": false,\n" + + " \"attachment\": {\n" + + " \"documentId\": \"%s\",\n" + + " \"documentType\": \"%s\"\n" + + " }\n" + + " }\n" + + " ]\n" + + "}", + givenCompanyNameKey, + givenCompanyNameName, + givenCompanyNameDescription, + givenCompanyNameCategory, + givenCompanyNameMinLength, + givenCompanyNameMaxLength, + givenCompanyNamePattern, + givenMonthlyCallsKey, + givenMonthlyCallsName, + givenMonthlyCallsOption1, + givenMonthlyCallsOption2, + givenMonthlyCallsOption3, + givenMonthlyCallsDescription, + givenMonthlyCallsCategory, + givenFoundedYearKey, + givenFoundedYearName, + givenFoundedYearDescription, + givenFoundedYearCategory, + givenFoundedYearMinValue, + givenFoundedYearMaxValue, + givenEmailKey, + givenEmailName, + givenEmailDescription, + givenEmailCategory, + givenWebsiteKey, + givenWebsiteName, + givenWebsiteDescription, + givenWebsiteCategory, + givenPhoneKey, + givenPhoneName, + givenPhoneDescription, + givenPhoneCategory, + givenRegDocKey, + givenRegDocName, + givenRegDocDescription, + givenRegDocCategory, + givenAddInfoKey, + givenAddInfoName, + givenAddInfoDescription, + givenAddInfoCategory, + givenAddInfoDocumentId, + givenAddInfoDocumentType); + + setUpSuccessPostRequest(REQUIREMENTS_LOOKUP, expectedRequest, givenResponse); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + ResourcesRequirementsLookupBody request = new ResourcesNumberRequirementSpecsRequestApiDoc() + .type(ResourcesNumberRequirementSpecsRequestApiDoc.TypeEnum.NUMBER_PURCHASE) + .quantity(givenQuantity) + .numberType(ResourcesResourceNumberType.TEN_DIGIT_LONG_CODE) + .capabilities(List.of(givenCapabilitySms, givenCapabilityVoice)) + .countryCode(givenCountryCode); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + + List requirements = response.getRequirements(); + then(requirements).isNotNull(); + then(requirements).hasSize(8); + + ResourcesTextRequirementSpec companyName = (ResourcesTextRequirementSpec) requirements.get(0); + then(companyName.getKey()).isEqualTo(givenCompanyNameKey); + then(companyName.getType()).isEqualTo(ResourcesFieldType.TEXT); + then(companyName.getName()).isEqualTo(givenCompanyNameName); + then(companyName.getDescription()).isEqualTo(givenCompanyNameDescription); + then(companyName.getCategory()).isEqualTo(givenCompanyNameCategory); + then(companyName.getRequired()).isTrue(); + ResourcesTextRequirementValidation companyNameValidation = companyName.getValidation(); + then(companyNameValidation).isNotNull(); + then(companyNameValidation.getMinLength()).isEqualTo(givenCompanyNameMinLength); + then(companyNameValidation.getMaxLength()).isEqualTo(givenCompanyNameMaxLength); + then(companyNameValidation.getPattern()).isEqualTo(givenCompanyNamePattern); + + ResourcesTextRequirementSpec monthlyCalls = (ResourcesTextRequirementSpec) requirements.get(1); + then(monthlyCalls.getKey()).isEqualTo(givenMonthlyCallsKey); + then(monthlyCalls.getType()).isEqualTo(ResourcesFieldType.TEXT); + then(monthlyCalls.getName()).isEqualTo(givenMonthlyCallsName); + then(monthlyCalls.getDescription()).isEqualTo(givenMonthlyCallsDescription); + then(monthlyCalls.getCategory()).isEqualTo(givenMonthlyCallsCategory); + then(monthlyCalls.getRequired()).isTrue(); + then(monthlyCalls.getOptions()) + .isEqualTo(List.of(givenMonthlyCallsOption1, givenMonthlyCallsOption2, givenMonthlyCallsOption3)); + + ResourcesIntegerRequirementSpec foundedYear = (ResourcesIntegerRequirementSpec) requirements.get(2); + then(foundedYear.getKey()).isEqualTo(givenFoundedYearKey); + then(foundedYear.getType()).isEqualTo(ResourcesFieldType.INTEGER); + then(foundedYear.getName()).isEqualTo(givenFoundedYearName); + then(foundedYear.getDescription()).isEqualTo(givenFoundedYearDescription); + then(foundedYear.getCategory()).isEqualTo(givenFoundedYearCategory); + then(foundedYear.getRequired()).isTrue(); + ResourcesIntegerRequirementValidation foundedYearValidation = foundedYear.getValidation(); + then(foundedYearValidation).isNotNull(); + then(foundedYearValidation.getMinValue()).isEqualTo(givenFoundedYearMinValue); + then(foundedYearValidation.getMaxValue()).isEqualTo(givenFoundedYearMaxValue); + + ResourcesEmailRequirementSpec email = (ResourcesEmailRequirementSpec) requirements.get(3); + then(email.getKey()).isEqualTo(givenEmailKey); + then(email.getType()).isEqualTo(ResourcesFieldType.EMAIL); + then(email.getName()).isEqualTo(givenEmailName); + then(email.getDescription()).isEqualTo(givenEmailDescription); + then(email.getCategory()).isEqualTo(givenEmailCategory); + then(email.getRequired()).isFalse(); + then(email.getMultipleValuesSupported()).isTrue(); + + ResourcesUrlRequirementSpec website = (ResourcesUrlRequirementSpec) requirements.get(4); + then(website.getKey()).isEqualTo(givenWebsiteKey); + then(website.getType()).isEqualTo(ResourcesFieldType.URL); + then(website.getName()).isEqualTo(givenWebsiteName); + then(website.getDescription()).isEqualTo(givenWebsiteDescription); + then(website.getCategory()).isEqualTo(givenWebsiteCategory); + then(website.getRequired()).isTrue(); + + ResourcesGsmRequirementSpec phone = (ResourcesGsmRequirementSpec) requirements.get(5); + then(phone.getKey()).isEqualTo(givenPhoneKey); + then(phone.getType()).isEqualTo(ResourcesFieldType.GSM); + then(phone.getName()).isEqualTo(givenPhoneName); + then(phone.getDescription()).isEqualTo(givenPhoneDescription); + then(phone.getCategory()).isEqualTo(givenPhoneCategory); + then(phone.getRequired()).isTrue(); + + ResourcesDocumentRequirementSpec regDoc = (ResourcesDocumentRequirementSpec) requirements.get(6); + then(regDoc.getKey()).isEqualTo(givenRegDocKey); + then(regDoc.getType()).isEqualTo(ResourcesFieldType.DOCUMENT); + then(regDoc.getName()).isEqualTo(givenRegDocName); + then(regDoc.getDescription()).isEqualTo(givenRegDocDescription); + then(regDoc.getCategory()).isEqualTo(givenRegDocCategory); + then(regDoc.getRequired()).isTrue(); + + ResourcesDocumentRequirementSpec addInfo = (ResourcesDocumentRequirementSpec) requirements.get(7); + then(addInfo.getKey()).isEqualTo(givenAddInfoKey); + then(addInfo.getType()).isEqualTo(ResourcesFieldType.DOCUMENT); + then(addInfo.getName()).isEqualTo(givenAddInfoName); + then(addInfo.getDescription()).isEqualTo(givenAddInfoDescription); + then(addInfo.getCategory()).isEqualTo(givenAddInfoCategory); + then(addInfo.getRequired()).isFalse(); + ResourcesAttachment attachment = addInfo.getAttachment(); + then(attachment).isNotNull(); + then(attachment.getDocumentId()).isEqualTo(givenAddInfoDocumentId); + then(attachment.getDocumentType()).isEqualTo(givenAddInfoDocumentType); + }; + + var call = api.resourcesRequirementsLookup(request); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldSubmitResourceRequest() { + String givenType = "NUMBER_PURCHASE"; + int givenQuantity = 1; + String givenNumberType = "TEN_DIGIT_LONG_CODE"; + String givenCapabilitySms = "SMS"; + String givenCapabilityVoice = "VOICE"; + String givenCountryCode = "US"; + String givenRequirementKey = "companyWebsite"; + String givenRequirementValue = "example.com"; + + String givenId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + + String expectedRequest = String.format( + "{\n" + + " \"type\": \"%s\",\n" + + " \"quantity\": %d,\n" + + " \"numberType\": \"%s\",\n" + + " \"capabilities\": [\"%s\", \"%s\"],\n" + + " \"countryCode\": \"%s\",\n" + + " \"requirements\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"value\": \"%s\"\n" + + " }\n" + + " ]\n" + + "}", + givenType, + givenQuantity, + givenNumberType, + givenCapabilitySms, + givenCapabilityVoice, + givenCountryCode, + givenRequirementKey, + givenRequirementValue); + + String givenResponse = String.format("{\n" + " \"id\": \"%s\"\n" + "}", givenId); + + setUpSuccessPostRequest(RESOURCE_REQUESTS, expectedRequest, givenResponse); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + ResourcesSubmitResourceRequestBody request = new ResourcesNumberResourceOrderRequestApiDoc() + .type(ResourcesNumberResourceOrderRequestApiDoc.TypeEnum.NUMBER_PURCHASE) + .quantity(givenQuantity) + .numberType(ResourcesResourceNumberType.TEN_DIGIT_LONG_CODE) + .capabilities(List.of(ResourcesResourceNumberCapability.SMS, ResourcesResourceNumberCapability.VOICE)) + .countryCode(givenCountryCode) + .requirements(List.of(new ResourcesFilledRequirement() + .key(givenRequirementKey) + .value(givenRequirementValue))); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + then(response.getId()).isEqualTo(UUID.fromString(givenId)); + }; + + var call = api.submitResourceRequest(request); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetResourceRequests() { + String givenAlphaId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + ResourcesAlphaResourceOrderApiDoc.TypeEnum givenAlphaType = + ResourcesAlphaResourceOrderApiDoc.TypeEnum.ALPHANUMERIC_REGISTRATION; + ResourcesResourceOrderStatus givenAlphaStatus = ResourcesResourceOrderStatus.PENDING; + String givenAlphaCountryCode = "HR"; + String givenAlphaSenderName = "Example sender"; + String givenAlphaEmail = "examples@example.com"; + String givenAlphaAdditionalEmail = "examples@example.com"; + String givenAlphaRequestedDate = "2019-08-24T14:15:22Z"; + String givenAlphaRequirementKey = "companyWebsite"; + String givenAlphaRequirementValue = "example.com"; + String givenAlphaApplicationId = "default"; + + String givenNumberId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + ResourcesNumberResourceOrderApiDoc.TypeEnum givenNumberType = + ResourcesNumberResourceOrderApiDoc.TypeEnum.NUMBER_PURCHASE; + String givenNumberCountryCode = "HR"; + String givenNumberEmail = "examples@example.com"; + String givenNumberRequestedDate = "2019-08-24T14:15:22Z"; + ResourcesResourceOrderStatus givenNumberStatus = ResourcesResourceOrderStatus.PENDING; + ResourcesResourceNumberType givenNumberNumberType = ResourcesResourceNumberType.TEN_DIGIT_LONG_CODE; + ResourcesResourceNumberCapability givenNumberCapabilitySms = ResourcesResourceNumberCapability.SMS; + ResourcesResourceNumberCapability givenNumberCapabilityVoice = ResourcesResourceNumberCapability.VOICE; + int givenNumberQuantity = 1; + String givenNumberRequirementKey = "companyWebsite"; + String givenNumberRequirementValue = "example.com"; + String givenNumberFeedbackKey = "companyWebsite"; + ResourcesFeedbackCode givenNumberFeedbackCode = ResourcesFeedbackCode.OTHER; + String givenNumberFeedbackText = "The provided company website does not exist."; + String givenNumberApplicationId = "app-id"; + String givenNumberEntityId = "entity-id"; + + int givenPage = 0; + int givenSize = 20; + int givenTotalPages = 1; + long givenTotalResults = 1L; + + String givenResponse = String.format( + "{\n" + + " \"results\": [\n" + + " {\n" + + " \"id\": \"%s\",\n" + + " \"type\": \"%s\",\n" + + " \"status\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"senderName\": \"%s\",\n" + + " \"requestedByEmailAddress\": \"%s\",\n" + + " \"additionalContactEmailAddresses\": [\"%s\"],\n" + + " \"requestedDate\": \"%s\",\n" + + " \"requirements\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"value\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"id\": \"%s\",\n" + + " \"type\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"requestedByEmailAddress\": \"%s\",\n" + + " \"requestedDate\": \"%s\",\n" + + " \"status\": \"%s\",\n" + + " \"numberType\": \"%s\",\n" + + " \"capabilities\": [\"%s\", \"%s\"],\n" + + " \"quantity\": %d,\n" + + " \"requirements\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"value\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"requirementsFeedback\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"code\": \"%s\",\n" + + " \"feedback\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"paging\": {\n" + + " \"page\": %d,\n" + + " \"size\": %d,\n" + + " \"totalPages\": %d,\n" + + " \"totalResults\": %d\n" + + " }\n" + + "}", + givenAlphaId, + givenAlphaType, + givenAlphaStatus, + givenAlphaCountryCode, + givenAlphaSenderName, + givenAlphaEmail, + givenAlphaAdditionalEmail, + givenAlphaRequestedDate, + givenAlphaRequirementKey, + givenAlphaRequirementValue, + givenAlphaApplicationId, + givenNumberId, + givenNumberType, + givenNumberCountryCode, + givenNumberEmail, + givenNumberRequestedDate, + givenNumberStatus, + givenNumberNumberType, + givenNumberCapabilitySms, + givenNumberCapabilityVoice, + givenNumberQuantity, + givenNumberRequirementKey, + givenNumberRequirementValue, + givenNumberFeedbackKey, + givenNumberFeedbackCode, + givenNumberFeedbackText, + givenNumberApplicationId, + givenNumberEntityId, + givenPage, + givenSize, + givenTotalPages, + givenTotalResults); + + setUpSuccessGetRequest(RESOURCE_REQUESTS, Map.of(), givenResponse); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + + List results = response.getResults(); + then(results).isNotNull(); + then(results).hasSize(2); + + ResourcesAlphaResourceOrderApiDoc alphaOrder = (ResourcesAlphaResourceOrderApiDoc) results.get(0); + then(alphaOrder.getId()).isEqualTo(UUID.fromString(givenAlphaId)); + then(alphaOrder.getType()).isEqualTo(givenAlphaType); + then(alphaOrder.getStatus()).isEqualTo(givenAlphaStatus); + then(alphaOrder.getCountryCode()).isEqualTo(givenAlphaCountryCode); + then(alphaOrder.getSenderName()).isEqualTo(givenAlphaSenderName); + then(alphaOrder.getRequestedByEmailAddress()).isEqualTo(givenAlphaEmail); + then(alphaOrder.getAdditionalContactEmailAddresses()).isEqualTo(List.of(givenAlphaAdditionalEmail)); + then(alphaOrder.getRequirements()).hasSize(1); + then(alphaOrder.getRequirements().get(0).getKey()).isEqualTo(givenAlphaRequirementKey); + then(alphaOrder.getRequirements().get(0).getValue()).isEqualTo(givenAlphaRequirementValue); + Platform alphaPlatform = alphaOrder.getPlatform(); + then(alphaPlatform).isNotNull(); + then(alphaPlatform.getApplicationId()).isEqualTo(givenAlphaApplicationId); + + ResourcesNumberResourceOrderApiDoc numberOrder = (ResourcesNumberResourceOrderApiDoc) results.get(1); + then(numberOrder.getId()).isEqualTo(UUID.fromString(givenNumberId)); + then(numberOrder.getType()).isEqualTo(givenNumberType); + then(numberOrder.getStatus()).isEqualTo(givenNumberStatus); + then(numberOrder.getCountryCode()).isEqualTo(givenNumberCountryCode); + then(numberOrder.getRequestedByEmailAddress()).isEqualTo(givenNumberEmail); + then(numberOrder.getNumberType()).isEqualTo(givenNumberNumberType); + then(numberOrder.getCapabilities()) + .isEqualTo(List.of(givenNumberCapabilitySms, givenNumberCapabilityVoice)); + then(numberOrder.getQuantity()).isEqualTo(givenNumberQuantity); + then(numberOrder.getRequirements()).hasSize(1); + then(numberOrder.getRequirements().get(0).getKey()).isEqualTo(givenNumberRequirementKey); + then(numberOrder.getRequirements().get(0).getValue()).isEqualTo(givenNumberRequirementValue); + then(numberOrder.getRequirementsFeedback()).hasSize(1); + ResourcesFilledRequirementFeedback feedback = + numberOrder.getRequirementsFeedback().get(0); + then(feedback.getKey()).isEqualTo(givenNumberFeedbackKey); + then(feedback.getCode()).isEqualTo(givenNumberFeedbackCode); + then(feedback.getFeedback()).isEqualTo(givenNumberFeedbackText); + Platform numberPlatform = numberOrder.getPlatform(); + then(numberPlatform).isNotNull(); + then(numberPlatform.getApplicationId()).isEqualTo(givenNumberApplicationId); + then(numberPlatform.getEntityId()).isEqualTo(givenNumberEntityId); + + PageInfo paging = response.getPaging(); + then(paging).isNotNull(); + then(paging.getPage()).isEqualTo(givenPage); + then(paging.getSize()).isEqualTo(givenSize); + then(paging.getTotalPages()).isEqualTo(givenTotalPages); + then(paging.getTotalResults()).isEqualTo(givenTotalResults); + }; + + var call = api.getResourceRequests() + .countryCode(List.of("US", "HR")) + .status(List.of(ResourcesResourceOrderStatus.PENDING, ResourcesResourceOrderStatus.COMPLETED)) + .type(List.of("ALPHANUMERIC_REGISTRATION", "NUMBER_PURCHASE", "RCS_SENDER_LAUNCH")) + .sort(List.of("status,desc")); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldGetResourceRequest() { + String givenId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + ResourcesAlphaResourceOrderApiDoc.TypeEnum givenType = + ResourcesAlphaResourceOrderApiDoc.TypeEnum.ALPHANUMERIC_REGISTRATION; + ResourcesResourceOrderStatus givenStatus = ResourcesResourceOrderStatus.UPDATE_REQUESTED; + String givenCountryCode = "HR"; + String givenSenderName = "Example sender"; + String givenRequestedByEmail = "examples@example.com"; + String givenAdditionalEmail = "examples@example.com"; + String givenRequestedDate = "2019-08-24T14:15:22Z"; + ResourcesTrafficOrigin givenTrafficOrigin = ResourcesTrafficOrigin.LOCAL; + String givenRequirementKey = "companyWebsite"; + String givenRequirementValue = "example.com"; + String givenFeedbackKey = "companyWebsite"; + ResourcesFeedbackCode givenFeedbackCode = ResourcesFeedbackCode.OTHER; + String givenFeedbackText = "The provided company website does not exist."; + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + + String givenResponse = String.format( + "{\n" + + " \"id\": \"%s\",\n" + + " \"type\": \"%s\",\n" + + " \"status\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"senderName\": \"%s\",\n" + + " \"requestedByEmailAddress\": \"%s\",\n" + + " \"additionalContactEmailAddresses\": [\"%s\"],\n" + + " \"requestedDate\": \"%s\",\n" + + " \"trafficOrigin\": \"%s\",\n" + + " \"requirements\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"value\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"requirementsFeedback\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"code\": \"%s\",\n" + + " \"feedback\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + + " }\n" + + "}", + givenId, + givenType, + givenStatus, + givenCountryCode, + givenSenderName, + givenRequestedByEmail, + givenAdditionalEmail, + givenRequestedDate, + givenTrafficOrigin, + givenRequirementKey, + givenRequirementValue, + givenFeedbackKey, + givenFeedbackCode, + givenFeedbackText, + givenApplicationId, + givenEntityId); + + setUpSuccessGetRequest(RESOURCE_REQUEST.replace("{id}", givenId), Map.of(), givenResponse); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + then(response).isInstanceOf(ResourcesAlphaResourceOrderApiDoc.class); + + ResourcesAlphaResourceOrderApiDoc order = (ResourcesAlphaResourceOrderApiDoc) response; + then(order.getId()).isEqualTo(UUID.fromString(givenId)); + then(order.getType()).isEqualTo(givenType); + then(order.getStatus()).isEqualTo(givenStatus); + then(order.getCountryCode()).isEqualTo(givenCountryCode); + then(order.getSenderName()).isEqualTo(givenSenderName); + then(order.getRequestedByEmailAddress()).isEqualTo(givenRequestedByEmail); + then(order.getAdditionalContactEmailAddresses()).isEqualTo(List.of(givenAdditionalEmail)); + then(order.getTrafficOrigin()).isEqualTo(givenTrafficOrigin); + + then(order.getRequirements()).hasSize(1); + ResourcesFilledRequirement requirement = order.getRequirements().get(0); + then(requirement.getKey()).isEqualTo(givenRequirementKey); + then(requirement.getValue()).isEqualTo(givenRequirementValue); + + then(order.getRequirementsFeedback()).hasSize(1); + ResourcesFilledRequirementFeedback feedback = + order.getRequirementsFeedback().get(0); + then(feedback.getKey()).isEqualTo(givenFeedbackKey); + then(feedback.getCode()).isEqualTo(givenFeedbackCode); + then(feedback.getFeedback()).isEqualTo(givenFeedbackText); + + Platform platform = order.getPlatform(); + then(platform).isNotNull(); + then(platform.getApplicationId()).isEqualTo(givenApplicationId); + then(platform.getEntityId()).isEqualTo(givenEntityId); + }; + + var call = api.getResourceRequest(UUID.fromString(givenId)); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldUpdateResourceRequest() { + String givenId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + String givenRequirementKey = "companyWebsite"; + String givenRequirementValue = "example.com"; + + ResourcesNumberResourceOrderApiDoc.TypeEnum givenType = + ResourcesNumberResourceOrderApiDoc.TypeEnum.NUMBER_PURCHASE; + ResourcesResourceOrderStatus givenStatus = ResourcesResourceOrderStatus.AUTOMATIC_VALIDATION; + String givenCountryCode = "HR"; + String givenRequestedByEmail = "examples@example.com"; + String givenRequestedDate = "2019-08-24T14:15:22Z"; + ResourcesResourceNumberType givenNumberType = ResourcesResourceNumberType.TEN_DIGIT_LONG_CODE; + ResourcesResourceNumberCapability givenCapabilitySms = ResourcesResourceNumberCapability.SMS; + ResourcesResourceNumberCapability givenCapabilityVoice = ResourcesResourceNumberCapability.VOICE; + int givenQuantity = 1; + String givenNote = "Example note"; + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + + String expectedRequest = String.format( + "{\n" + + " \"requirements\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"value\": \"%s\"\n" + + " }\n" + + " ]\n" + + "}", + givenRequirementKey, givenRequirementValue); + + String givenResponse = String.format( + "{\n" + + " \"id\": \"%s\",\n" + + " \"type\": \"%s\",\n" + + " \"status\": \"%s\",\n" + + " \"countryCode\": \"%s\",\n" + + " \"requestedByEmailAddress\": \"%s\",\n" + + " \"requestedDate\": \"%s\",\n" + + " \"numberType\": \"%s\",\n" + + " \"capabilities\": [\"%s\", \"%s\"],\n" + + " \"quantity\": %d,\n" + + " \"note\": \"%s\",\n" + + " \"numbers\": [],\n" + + " \"requirements\": [\n" + + " {\n" + + " \"key\": \"%s\",\n" + + " \"value\": \"%s\"\n" + + " }\n" + + " ],\n" + + " \"platform\": {\n" + + " \"applicationId\": \"%s\",\n" + + " \"entityId\": \"%s\"\n" + + " }\n" + + "}", + givenId, + givenType, + givenStatus, + givenCountryCode, + givenRequestedByEmail, + givenRequestedDate, + givenNumberType, + givenCapabilitySms, + givenCapabilityVoice, + givenQuantity, + givenNote, + givenRequirementKey, + givenRequirementValue, + givenApplicationId, + givenEntityId); + + setUpPatchRequest(RESOURCE_REQUEST.replace("{id}", givenId), Map.of(), expectedRequest, givenResponse, 200); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + ResourcesUpdateResourceOrderRequest request = new ResourcesUpdateResourceOrderRequest() + .requirements(List.of(new ResourcesFilledRequirement() + .key(givenRequirementKey) + .value(givenRequirementValue))); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + then(response).isInstanceOf(ResourcesNumberResourceOrderApiDoc.class); + + ResourcesNumberResourceOrderApiDoc order = (ResourcesNumberResourceOrderApiDoc) response; + then(order.getId()).isEqualTo(UUID.fromString(givenId)); + then(order.getType()).isEqualTo(givenType); + then(order.getStatus()).isEqualTo(givenStatus); + then(order.getCountryCode()).isEqualTo(givenCountryCode); + then(order.getRequestedByEmailAddress()).isEqualTo(givenRequestedByEmail); + then(order.getNumberType()).isEqualTo(givenNumberType); + then(order.getCapabilities()).isEqualTo(List.of(givenCapabilitySms, givenCapabilityVoice)); + then(order.getQuantity()).isEqualTo(givenQuantity); + then(order.getNote()).isEqualTo(givenNote); + then(order.getNumbers()).isEmpty(); + + then(order.getRequirements()).hasSize(1); + ResourcesFilledRequirement requirement = order.getRequirements().get(0); + then(requirement.getKey()).isEqualTo(givenRequirementKey); + then(requirement.getValue()).isEqualTo(givenRequirementValue); + + Platform platform = order.getPlatform(); + then(platform).isNotNull(); + then(platform.getApplicationId()).isEqualTo(givenApplicationId); + then(platform.getEntityId()).isEqualTo(givenEntityId); + }; + + var call = api.updateResourceRequest(UUID.fromString(givenId), request); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldCancelResourceRequest() { + String givenId = "a0c63335-f841-4d43-9ef8-e0765a233f29"; + + setUpNoBodyPostRequest(CANCEL_RESOURCE_REQUEST.replace("{id}", givenId), Map.of(), 204); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + var call = api.cancelResourceRequest(UUID.fromString(givenId)); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + @Test + void shouldUploadDocument() throws IOException { + String givenFileContent = "Test document content"; + String givenDocumentId = + "103AFCC51DC08FDD351D6ACB689FA071FDF7F7EB92FD6451F62A3AA92EBFA69596150BE4C4BFFBC97182A27D716ED0D3CB67682EF7E0D615EC501064A8B9A201"; + + File tempFile = File.createTempFile("document", ".jpg"); + Files.writeString(tempFile.toPath(), givenFileContent); + + String givenResponse = String.format("{\n" + " \"documentId\": \"%s\"\n" + "}", givenDocumentId); + + setUpMultipartRequest(DOCUMENTS, List.of(new Multipart("document", givenFileContent)), givenResponse, 200); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + Consumer assertions = (response) -> { + then(response).isNotNull(); + then(response.getDocumentId()).isEqualTo(givenDocumentId); + }; + + var call = api.uploadDocument(tempFile); + testSuccessfulCall(call::execute, assertions); + testSuccessfulAsyncCall(call::executeAsync, assertions); + } + + @Test + void shouldDownloadDocument() { + String givenDocumentId = + "103AFCC51DC08FDD351D6ACB689FA071FDF7F7EB92FD6451F62A3AA92EBFA69596150BE4C4BFFBC97182A27D716ED0D3CB67682EF7E0D615EC501064A8B9A201"; + String givenFileContent = "Test document content"; + + setUpSuccessGetRequest(DOCUMENT.replace("{documentId}", givenDocumentId), Map.of(), givenFileContent); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + var call = api.downloadDocument(givenDocumentId); + testSuccessfulCallWithFileResult(call::execute); + } + + @Test + void shouldDeleteDocument() { + String givenDocumentId = + "103AFCC51DC08FDD351D6ACB689FA071FDF7F7EB92FD6451F62A3AA92EBFA69596150BE4C4BFFBC97182A27D716ED0D3CB67682EF7E0D615EC501064A8B9A201"; + + setUpNoResponseBodyDeleteRequest(DOCUMENT.replace("{documentId}", givenDocumentId), Map.of(), 204); + + ResourcesApi api = new ResourcesApi(getApiClient()); + + var call = api.deleteDocument(givenDocumentId); + testSuccessfulCallWithNoBody(call::executeAsync, 204); + } + + // WEBHOOKS + private final JSON json = new JSON(); + + @Test + void shouldReceiveResourceRequestStatusUpdate() { + String givenId = "38a1c2c6-55f2-11ee-a061-325096b39f47"; + String givenReceivedAtString = "2019-08-24T14:15:22.000+0000"; + String givenNumber = "385911234567"; + String givenNumberKey = "8F0792F86035A9F4290821F1EE6BC06A"; + String givenNote = "Please note that these numbers are for testing purposes only."; + String givenApplicationId = "application-id"; + String givenEntityId = "entity-id"; + + String givenRequest = "{\n" + + " \"results\": [\n" + + " {\n" + + " \"event\": \"RESOURCE_REQUEST_STATUS_UPDATE\",\n" + + " \"receivedAt\": \"" + + givenReceivedAtString + + "\",\n" + + " \"content\": {\n" + + " \"id\": \"" + + givenId + + "\",\n" + + " \"status\": \"COMPLETED\",\n" + + " \"type\": \"NUMBER_PURCHASE\",\n" + + " \"numbers\": [\n" + + " {\n" + + " \"number\": \"" + + givenNumber + + "\",\n" + + " \"numberKey\": \"" + + givenNumberKey + + "\",\n" + + " \"status\": \"SUCCESS\"\n" + + " }\n" + + " ],\n" + + " \"requirementsFeedback\": [],\n" + + " \"note\": \"" + + givenNote + + "\"\n" + + " },\n" + + " \"platform\": {\n" + + " \"applicationId\": \"" + + givenApplicationId + + "\",\n" + + " \"entityId\": \"" + + givenEntityId + + "\"\n" + + " }\n" + + " }\n" + + " ]\n" + + "}\n"; + + ResourcesWebhookNotifApiDocRequestBody requestBody = + json.deserialize(givenRequest, ResourcesWebhookNotifApiDocRequestBody.class); + + then(requestBody).isNotNull(); + then(requestBody.getResults()).isNotNull(); + then(requestBody.getResults().size()).isEqualTo(1); + + ResourcesWebhookNotifApiDocResult result = requestBody.getResults().get(0); + then(result.getEvent()).isEqualTo(ResourcesWebhookNotifEventType.RESOURCE_REQUEST_STATUS_UPDATE); + then(result.getPlatform()).isNotNull(); + then(result.getPlatform().getApplicationId()).isEqualTo(givenApplicationId); + then(result.getPlatform().getEntityId()).isEqualTo(givenEntityId); + + then(result.getContent()).isNotNull(); + then(result.getContent().getClass()).isEqualTo(ResourcesNumberWebhookNotifApiDoc.class); + ResourcesNumberWebhookNotifApiDoc content = (ResourcesNumberWebhookNotifApiDoc) result.getContent(); + then(content.getId()).isEqualTo(givenId); + then(content.getStatus()).isEqualTo(ResourcesNumberWebhookNotifApiDoc.StatusEnum.COMPLETED); + then(content.getType()).isEqualTo(ResourcesWebhookNotifContentType.NUMBER_PURCHASE); + then(content.getNumbers()).isNotNull(); + then(content.getNumbers().size()).isEqualTo(1); + then(content.getNumbers().get(0).getNumber()).isEqualTo(givenNumber); + then(content.getNumbers().get(0).getNumberKey()).isEqualTo(givenNumberKey); + then(content.getNumbers().get(0).getStatus()).isEqualTo(ResourcesNumberStatus.SUCCESS); + then(content.getRequirementsFeedback()).isNotNull(); + then(content.getRequirementsFeedback()).isEmpty(); + then(content.getNote()).isEqualTo(givenNote); + } +} diff --git a/src/test/java/com/infobip/api/WhatsAppApiTest.java b/src/test/java/com/infobip/api/WhatsAppApiTest.java index a7fd9bb..22510c7 100644 --- a/src/test/java/com/infobip/api/WhatsAppApiTest.java +++ b/src/test/java/com/infobip/api/WhatsAppApiTest.java @@ -10380,4 +10380,20 @@ void shouldEditTemplatePlatformDataEditWhatsappTemplate() { testSuccessfulCall(call::execute, assertions); testSuccessfulAsyncCall(call::executeAsync, assertions); } + + @Test + void shouldShareWabaWhatsapp() { + WhatsAppApi whatsAppApi = new WhatsAppApi(getApiClient()); + Long givenBusinessAccountId = 222L; + + String givenRequest = String.format("{\n" + " \"businessAccountId\": %d\n" + "}", givenBusinessAccountId); + + setUpNoResponseBodyPostRequest( + "/whatsapp/1/embedded-signup/registrations/share-waba", Map.of(), givenRequest, 202); + + WhatsAppShareWabaRequest request = new WhatsAppShareWabaRequest().businessAccountId(givenBusinessAccountId); + + var call = whatsAppApi.shareWabaWhatsapp(request); + testSuccessfulCallWithNoBody(call::executeAsync, 202); + } } From 22d30088b9d0e52ed85fb5cadc19debe2ba09ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Thu, 26 Mar 2026 16:14:50 +0100 Subject: [PATCH 2/9] Update. --- src/main/java/com/infobip/api/CallsApi.java | 22 +-- .../java/com/infobip/api/ResourcesApi.java | 25 +-- .../model/CallsDialogRecordingPage.java | 10 +- ...java => CallsDialogRecordingResponse.java} | 58 +++---- .../com/infobip/model/RcsInboundEvent.java | 8 +- .../com/infobip/model/RcsInboundMessage.java | 8 +- .../com/infobip/model/RcsPlatformInfo.java | 146 ------------------ .../ResourcesAlphaResourceOrderApiDoc.java | 4 +- ... ResourcesGetResourceRequestResponse.java} | 2 +- .../ResourcesNumberResourceOrderApiDoc.java | 4 +- ...ResourcesRcsSenderResourceOrderApiDoc.java | 4 +- ...esourcesUpdateResourceRequestResponse.java | 21 +++ .../com/infobip/api/ResourcesApiTest.java | 4 +- 13 files changed, 100 insertions(+), 216 deletions(-) rename src/main/java/com/infobip/model/{CallsPublicDialogRecording.java => CallsDialogRecordingResponse.java} (80%) delete mode 100644 src/main/java/com/infobip/model/RcsPlatformInfo.java rename src/main/java/com/infobip/model/{GetResourceRequest200Response.java => ResourcesGetResourceRequestResponse.java} (93%) create mode 100644 src/main/java/com/infobip/model/ResourcesUpdateResourceRequestResponse.java diff --git a/src/main/java/com/infobip/api/CallsApi.java b/src/main/java/com/infobip/api/CallsApi.java index 58c462a..357c001 100644 --- a/src/main/java/com/infobip/api/CallsApi.java +++ b/src/main/java/com/infobip/api/CallsApi.java @@ -56,6 +56,7 @@ import com.infobip.model.CallsDialogPlayRequest; import com.infobip.model.CallsDialogRecordingPage; import com.infobip.model.CallsDialogRecordingRequest; +import com.infobip.model.CallsDialogRecordingResponse; import com.infobip.model.CallsDialogRequest; import com.infobip.model.CallsDialogResponse; import com.infobip.model.CallsDialogSayRequest; @@ -75,7 +76,6 @@ import com.infobip.model.CallsPreAnswerRequest; import com.infobip.model.CallsPublicConferenceRecording; import com.infobip.model.CallsPublicCountry; -import com.infobip.model.CallsPublicDialogRecording; import com.infobip.model.CallsPublicRecording; import com.infobip.model.CallsPublicRecordingFile; import com.infobip.model.CallsPublicRegion; @@ -2828,13 +2828,13 @@ public DeleteDialogRecordingsRequest location(CallsRecordingLocation location) { /** * Executes the deleteDialogRecordings request. * - * @return CallsPublicDialogRecording The deserialized response. + * @return CallsDialogRecordingResponse The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsPublicDialogRecording execute() throws ApiException { + public CallsDialogRecordingResponse execute() throws ApiException { RequestDefinition deleteDialogRecordingsDefinition = deleteDialogRecordingsDefinition(dialogId, location); return apiClient.execute( - deleteDialogRecordingsDefinition, new TypeReference() {}.getType()); + deleteDialogRecordingsDefinition, new TypeReference() {}.getType()); } /** @@ -2843,11 +2843,11 @@ public CallsPublicDialogRecording execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition deleteDialogRecordingsDefinition = deleteDialogRecordingsDefinition(dialogId, location); return apiClient.executeAsync( deleteDialogRecordingsDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } @@ -6015,13 +6015,13 @@ public GetDialogRecordingsRequest location(CallsRecordingLocation location) { /** * Executes the getDialogRecordings request. * - * @return CallsPublicDialogRecording The deserialized response. + * @return CallsDialogRecordingResponse The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsPublicDialogRecording execute() throws ApiException { + public CallsDialogRecordingResponse execute() throws ApiException { RequestDefinition getDialogRecordingsDefinition = getDialogRecordingsDefinition(dialogId, location); return apiClient.execute( - getDialogRecordingsDefinition, new TypeReference() {}.getType()); + getDialogRecordingsDefinition, new TypeReference() {}.getType()); } /** @@ -6030,11 +6030,11 @@ public CallsPublicDialogRecording execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition getDialogRecordingsDefinition = getDialogRecordingsDefinition(dialogId, location); return apiClient.executeAsync( getDialogRecordingsDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } diff --git a/src/main/java/com/infobip/api/ResourcesApi.java b/src/main/java/com/infobip/api/ResourcesApi.java index f6404db..ec2c25e 100644 --- a/src/main/java/com/infobip/api/ResourcesApi.java +++ b/src/main/java/com/infobip/api/ResourcesApi.java @@ -16,9 +16,9 @@ import com.infobip.ApiException; import com.infobip.Parameter; import com.infobip.RequestDefinition; -import com.infobip.model.GetResourceRequest200Response; import com.infobip.model.ResourcesConfigurationType; import com.infobip.model.ResourcesDocumentIdentifier; +import com.infobip.model.ResourcesGetResourceRequestResponse; import com.infobip.model.ResourcesIbResourceCoverageInfo; import com.infobip.model.ResourcesIbResourceCoverageKey; import com.infobip.model.ResourcesIbResourcesFilter; @@ -32,6 +32,7 @@ import com.infobip.model.ResourcesResourceOrderStatus; import com.infobip.model.ResourcesSubmitResourceRequestBody; import com.infobip.model.ResourcesUpdateResourceOrderRequest; +import com.infobip.model.ResourcesUpdateResourceRequestResponse; import java.io.File; import java.util.List; import java.util.Objects; @@ -481,13 +482,14 @@ private GetResourceRequestRequest(UUID id) { /** * Executes the getResourceRequest request. * - * @return GetResourceRequest200Response The deserialized response. + * @return ResourcesGetResourceRequestResponse The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public GetResourceRequest200Response execute() throws ApiException { + public ResourcesGetResourceRequestResponse execute() throws ApiException { RequestDefinition getResourceRequestDefinition = getResourceRequestDefinition(id); return apiClient.execute( - getResourceRequestDefinition, new TypeReference() {}.getType()); + getResourceRequestDefinition, + new TypeReference() {}.getType()); } /** @@ -496,11 +498,11 @@ public GetResourceRequest200Response execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition getResourceRequestDefinition = getResourceRequestDefinition(id); return apiClient.executeAsync( getResourceRequestDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } @@ -1066,14 +1068,15 @@ private UpdateResourceRequestRequest( /** * Executes the updateResourceRequest request. * - * @return GetResourceRequest200Response The deserialized response. + * @return ResourcesUpdateResourceRequestResponse The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public GetResourceRequest200Response execute() throws ApiException { + public ResourcesUpdateResourceRequestResponse execute() throws ApiException { RequestDefinition updateResourceRequestDefinition = updateResourceRequestDefinition(id, resourcesUpdateResourceOrderRequest); return apiClient.execute( - updateResourceRequestDefinition, new TypeReference() {}.getType()); + updateResourceRequestDefinition, + new TypeReference() {}.getType()); } /** @@ -1082,12 +1085,12 @@ public GetResourceRequest200Response execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition updateResourceRequestDefinition = updateResourceRequestDefinition(id, resourcesUpdateResourceOrderRequest); return apiClient.executeAsync( updateResourceRequestDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingPage.java b/src/main/java/com/infobip/model/CallsDialogRecordingPage.java index 9ccb8ef..8383227 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecordingPage.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingPage.java @@ -19,7 +19,7 @@ */ public class CallsDialogRecordingPage { - private List results = null; + private List results = null; private PageInfo paging; @@ -32,7 +32,7 @@ public class CallsDialogRecordingPage { * @param results * @return This {@link CallsDialogRecordingPage instance}. */ - public CallsDialogRecordingPage results(List results) { + public CallsDialogRecordingPage results(List results) { this.results = results; return this; } @@ -46,7 +46,7 @@ public CallsDialogRecordingPage results(List results * @param resultsItem The item to be added to the list. * @return This {@link CallsDialogRecordingPage instance}. */ - public CallsDialogRecordingPage addResultsItem(CallsPublicDialogRecording resultsItem) { + public CallsDialogRecordingPage addResultsItem(CallsDialogRecordingResponse resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -63,7 +63,7 @@ public CallsDialogRecordingPage addResultsItem(CallsPublicDialogRecording result * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -76,7 +76,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } diff --git a/src/main/java/com/infobip/model/CallsPublicDialogRecording.java b/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java similarity index 80% rename from src/main/java/com/infobip/model/CallsPublicDialogRecording.java rename to src/main/java/com/infobip/model/CallsDialogRecordingResponse.java index d7a81f0..9ebd5f7 100644 --- a/src/main/java/com/infobip/model/CallsPublicDialogRecording.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java @@ -16,9 +16,9 @@ import java.util.Objects; /** - * Represents CallsPublicDialogRecording model. + * Represents CallsDialogRecordingResponse model. */ -public class CallsPublicDialogRecording { +public class CallsDialogRecordingResponse { private String dialogId; @@ -41,9 +41,9 @@ public class CallsPublicDialogRecording { * Unique dialog ID. * * @param dialogId - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording dialogId(String dialogId) { + public CallsDialogRecordingResponse dialogId(String dialogId) { this.dialogId = dialogId; return this; } @@ -81,9 +81,9 @@ public void setDialogId(String dialogId) { * Calls Configuration ID. * * @param callsConfigurationId - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording callsConfigurationId(String callsConfigurationId) { + public CallsDialogRecordingResponse callsConfigurationId(String callsConfigurationId) { this.callsConfigurationId = callsConfigurationId; return this; } @@ -118,9 +118,9 @@ public void setCallsConfigurationId(String callsConfigurationId) { * Sets platform. * * @param platform - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording platform(Platform platform) { + public CallsDialogRecordingResponse platform(Platform platform) { this.platform = platform; return this; } @@ -152,9 +152,9 @@ public void setPlatform(Platform platform) { * File(s) with a recording of both dialog participants. * * @param composedFiles - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording composedFiles(List composedFiles) { + public CallsDialogRecordingResponse composedFiles(List composedFiles) { this.composedFiles = composedFiles; return this; } @@ -166,9 +166,9 @@ public CallsPublicDialogRecording composedFiles(List c * File(s) with a recording of both dialog participants. * * @param composedFilesItem The item to be added to the list. - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording addComposedFilesItem(CallsPublicRecordingFile composedFilesItem) { + public CallsDialogRecordingResponse addComposedFilesItem(CallsPublicRecordingFile composedFilesItem) { if (this.composedFiles == null) { this.composedFiles = new ArrayList<>(); } @@ -209,9 +209,9 @@ public void setComposedFiles(List composedFiles) { * File(s) with a recording of one dialog participant. * * @param callRecordings - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording callRecordings(List callRecordings) { + public CallsDialogRecordingResponse callRecordings(List callRecordings) { this.callRecordings = callRecordings; return this; } @@ -223,9 +223,9 @@ public CallsPublicDialogRecording callRecordings(List call * File(s) with a recording of one dialog participant. * * @param callRecordingsItem The item to be added to the list. - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording addCallRecordingsItem(CallsPublicRecording callRecordingsItem) { + public CallsDialogRecordingResponse addCallRecordingsItem(CallsPublicRecording callRecordingsItem) { if (this.callRecordings == null) { this.callRecordings = new ArrayList<>(); } @@ -266,9 +266,9 @@ public void setCallRecordings(List callRecordings) { * Date and time when the (first) recording started. * * @param startTime - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording startTime(OffsetDateTime startTime) { + public CallsDialogRecordingResponse startTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -306,9 +306,9 @@ public void setStartTime(OffsetDateTime startTime) { * Date and time when the (last) recording ended. * * @param endTime - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsPublicDialogRecording endTime(OffsetDateTime endTime) { + public CallsDialogRecordingResponse endTime(OffsetDateTime endTime) { this.endTime = endTime; return this; } @@ -347,14 +347,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CallsPublicDialogRecording callsPublicDialogRecording = (CallsPublicDialogRecording) o; - return Objects.equals(this.dialogId, callsPublicDialogRecording.dialogId) - && Objects.equals(this.callsConfigurationId, callsPublicDialogRecording.callsConfigurationId) - && Objects.equals(this.platform, callsPublicDialogRecording.platform) - && Objects.equals(this.composedFiles, callsPublicDialogRecording.composedFiles) - && Objects.equals(this.callRecordings, callsPublicDialogRecording.callRecordings) - && Objects.equals(this.startTime, callsPublicDialogRecording.startTime) - && Objects.equals(this.endTime, callsPublicDialogRecording.endTime); + CallsDialogRecordingResponse callsDialogRecordingResponse = (CallsDialogRecordingResponse) o; + return Objects.equals(this.dialogId, callsDialogRecordingResponse.dialogId) + && Objects.equals(this.callsConfigurationId, callsDialogRecordingResponse.callsConfigurationId) + && Objects.equals(this.platform, callsDialogRecordingResponse.platform) + && Objects.equals(this.composedFiles, callsDialogRecordingResponse.composedFiles) + && Objects.equals(this.callRecordings, callsDialogRecordingResponse.callRecordings) + && Objects.equals(this.startTime, callsDialogRecordingResponse.startTime) + && Objects.equals(this.endTime, callsDialogRecordingResponse.endTime); } @Override @@ -367,7 +367,7 @@ public int hashCode() { public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class CallsPublicDialogRecording {") + .append("class CallsDialogRecordingResponse {") .append(newLine) .append(" dialogId: ") .append(toIndentedString(dialogId)) diff --git a/src/main/java/com/infobip/model/RcsInboundEvent.java b/src/main/java/com/infobip/model/RcsInboundEvent.java index 983de5e..3c67c47 100644 --- a/src/main/java/com/infobip/model/RcsInboundEvent.java +++ b/src/main/java/com/infobip/model/RcsInboundEvent.java @@ -44,7 +44,7 @@ public class RcsInboundEvent { private RcsConversationInfo conversation; - private RcsPlatformInfo platform; + private Platform platform; /** * Sets campaignReferenceId. @@ -592,7 +592,7 @@ public void setConversation(RcsConversationInfo conversation) { * @param platform * @return This {@link RcsInboundEvent instance}. */ - public RcsInboundEvent platform(RcsPlatformInfo platform) { + public RcsInboundEvent platform(Platform platform) { this.platform = platform; return this; } @@ -605,7 +605,7 @@ public RcsInboundEvent platform(RcsPlatformInfo platform) { * @return platform */ @JsonProperty("platform") - public RcsPlatformInfo getPlatform() { + public Platform getPlatform() { return platform; } @@ -617,7 +617,7 @@ public RcsPlatformInfo getPlatform() { * @param platform */ @JsonProperty("platform") - public void setPlatform(RcsPlatformInfo platform) { + public void setPlatform(Platform platform) { this.platform = platform; } diff --git a/src/main/java/com/infobip/model/RcsInboundMessage.java b/src/main/java/com/infobip/model/RcsInboundMessage.java index 0af010f..a435fc0 100644 --- a/src/main/java/com/infobip/model/RcsInboundMessage.java +++ b/src/main/java/com/infobip/model/RcsInboundMessage.java @@ -46,7 +46,7 @@ public class RcsInboundMessage { private RcsConversationInfo conversation; - private RcsPlatformInfo platform; + private Platform platform; /** * Sets campaignReferenceId. @@ -640,7 +640,7 @@ public void setConversation(RcsConversationInfo conversation) { * @param platform * @return This {@link RcsInboundMessage instance}. */ - public RcsInboundMessage platform(RcsPlatformInfo platform) { + public RcsInboundMessage platform(Platform platform) { this.platform = platform; return this; } @@ -653,7 +653,7 @@ public RcsInboundMessage platform(RcsPlatformInfo platform) { * @return platform */ @JsonProperty("platform") - public RcsPlatformInfo getPlatform() { + public Platform getPlatform() { return platform; } @@ -665,7 +665,7 @@ public RcsPlatformInfo getPlatform() { * @param platform */ @JsonProperty("platform") - public void setPlatform(RcsPlatformInfo platform) { + public void setPlatform(Platform platform) { this.platform = platform; } diff --git a/src/main/java/com/infobip/model/RcsPlatformInfo.java b/src/main/java/com/infobip/model/RcsPlatformInfo.java deleted file mode 100644 index 70e4e2f..0000000 --- a/src/main/java/com/infobip/model/RcsPlatformInfo.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * This class is auto generated from the Infobip OpenAPI specification - * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), - * powered by the OpenAPI Generator (https://openapi-generator.tech). - * - * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide - * or contact us @ support@infobip.com. - */ - -package com.infobip.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -/** - * Platform information associated with the message. - */ -public class RcsPlatformInfo { - - private String applicationId; - - private String entityId; - - /** - * Sets applicationId. - *

- * Field description: - * Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @param applicationId - * @return This {@link RcsPlatformInfo instance}. - */ - public RcsPlatformInfo applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Returns applicationId. - *

- * Field description: - * Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @return applicationId - */ - @JsonProperty("applicationId") - public String getApplicationId() { - return applicationId; - } - - /** - * Sets applicationId. - *

- * Field description: - * Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @param applicationId - */ - @JsonProperty("applicationId") - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - /** - * Sets entityId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @param entityId - * @return This {@link RcsPlatformInfo instance}. - */ - public RcsPlatformInfo entityId(String entityId) { - this.entityId = entityId; - return this; - } - - /** - * Returns entityId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @return entityId - */ - @JsonProperty("entityId") - public String getEntityId() { - return entityId; - } - - /** - * Sets entityId. - *

- * Field description: - * Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management). - * - * @param entityId - */ - @JsonProperty("entityId") - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RcsPlatformInfo rcsPlatformInfo = (RcsPlatformInfo) o; - return Objects.equals(this.applicationId, rcsPlatformInfo.applicationId) - && Objects.equals(this.entityId, rcsPlatformInfo.entityId); - } - - @Override - public int hashCode() { - return Objects.hash(applicationId, entityId); - } - - @Override - public String toString() { - String newLine = System.lineSeparator(); - return new StringBuilder() - .append("class RcsPlatformInfo {") - .append(newLine) - .append(" applicationId: ") - .append(toIndentedString(applicationId)) - .append(newLine) - .append(" entityId: ") - .append(toIndentedString(entityId)) - .append(newLine) - .append("}") - .toString(); - } - - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - String lineSeparator = System.lineSeparator(); - String lineSeparatorFollowedByIndentation = lineSeparator + " "; - return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation); - } -} diff --git a/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderApiDoc.java b/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderApiDoc.java index 83d9314..ce104bc 100644 --- a/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderApiDoc.java +++ b/src/main/java/com/infobip/model/ResourcesAlphaResourceOrderApiDoc.java @@ -22,7 +22,9 @@ * Represents ResourcesAlphaResourceOrderApiDoc model. */ public class ResourcesAlphaResourceOrderApiDoc - implements GetResourceRequest200Response, ResourcesPageResourceOrderApiDocResultsInner { + implements ResourcesGetResourceRequestResponse, + ResourcesPageResourceOrderApiDocResultsInner, + ResourcesUpdateResourceRequestResponse { private UUID id; diff --git a/src/main/java/com/infobip/model/GetResourceRequest200Response.java b/src/main/java/com/infobip/model/ResourcesGetResourceRequestResponse.java similarity index 93% rename from src/main/java/com/infobip/model/GetResourceRequest200Response.java rename to src/main/java/com/infobip/model/ResourcesGetResourceRequestResponse.java index 2af9367..b636e6f 100644 --- a/src/main/java/com/infobip/model/GetResourceRequest200Response.java +++ b/src/main/java/com/infobip/model/ResourcesGetResourceRequestResponse.java @@ -18,4 +18,4 @@ @JsonSubTypes.Type(value = ResourcesNumberResourceOrderApiDoc.class), @JsonSubTypes.Type(value = ResourcesRcsSenderResourceOrderApiDoc.class) }) -public interface GetResourceRequest200Response {} +public interface ResourcesGetResourceRequestResponse {} diff --git a/src/main/java/com/infobip/model/ResourcesNumberResourceOrderApiDoc.java b/src/main/java/com/infobip/model/ResourcesNumberResourceOrderApiDoc.java index 977c5f1..6b81690 100644 --- a/src/main/java/com/infobip/model/ResourcesNumberResourceOrderApiDoc.java +++ b/src/main/java/com/infobip/model/ResourcesNumberResourceOrderApiDoc.java @@ -22,7 +22,9 @@ * Represents ResourcesNumberResourceOrderApiDoc model. */ public class ResourcesNumberResourceOrderApiDoc - implements GetResourceRequest200Response, ResourcesPageResourceOrderApiDocResultsInner { + implements ResourcesGetResourceRequestResponse, + ResourcesPageResourceOrderApiDocResultsInner, + ResourcesUpdateResourceRequestResponse { private UUID id; diff --git a/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderApiDoc.java b/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderApiDoc.java index 8ab0d32..cf6b657 100644 --- a/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderApiDoc.java +++ b/src/main/java/com/infobip/model/ResourcesRcsSenderResourceOrderApiDoc.java @@ -22,7 +22,9 @@ * Represents ResourcesRcsSenderResourceOrderApiDoc model. */ public class ResourcesRcsSenderResourceOrderApiDoc - implements GetResourceRequest200Response, ResourcesPageResourceOrderApiDocResultsInner { + implements ResourcesGetResourceRequestResponse, + ResourcesPageResourceOrderApiDocResultsInner, + ResourcesUpdateResourceRequestResponse { private UUID id; diff --git a/src/main/java/com/infobip/model/ResourcesUpdateResourceRequestResponse.java b/src/main/java/com/infobip/model/ResourcesUpdateResourceRequestResponse.java new file mode 100644 index 0000000..c6a308e --- /dev/null +++ b/src/main/java/com/infobip/model/ResourcesUpdateResourceRequestResponse.java @@ -0,0 +1,21 @@ +/* + * This class is auto generated from the Infobip OpenAPI specification + * through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR), + * powered by the OpenAPI Generator (https://openapi-generator.tech). + * + * Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide + * or contact us @ support@infobip.com. + */ + +package com.infobip.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ResourcesAlphaResourceOrderApiDoc.class), + @JsonSubTypes.Type(value = ResourcesNumberResourceOrderApiDoc.class), + @JsonSubTypes.Type(value = ResourcesRcsSenderResourceOrderApiDoc.class) +}) +public interface ResourcesUpdateResourceRequestResponse {} diff --git a/src/test/java/com/infobip/api/ResourcesApiTest.java b/src/test/java/com/infobip/api/ResourcesApiTest.java index 98b9e39..16bad25 100644 --- a/src/test/java/com/infobip/api/ResourcesApiTest.java +++ b/src/test/java/com/infobip/api/ResourcesApiTest.java @@ -1230,7 +1230,7 @@ void shouldGetResourceRequest() { ResourcesApi api = new ResourcesApi(getApiClient()); - Consumer assertions = (response) -> { + Consumer assertions = (response) -> { then(response).isNotNull(); then(response).isInstanceOf(ResourcesAlphaResourceOrderApiDoc.class); @@ -1347,7 +1347,7 @@ void shouldUpdateResourceRequest() { .key(givenRequirementKey) .value(givenRequirementValue))); - Consumer assertions = (response) -> { + Consumer assertions = (response) -> { then(response).isNotNull(); then(response).isInstanceOf(ResourcesNumberResourceOrderApiDoc.class); From a29d6cff17a59765fd3e84d526bebc0b8e338015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Thu, 26 Mar 2026 16:44:55 +0100 Subject: [PATCH 3/9] Updated CHANGELOG.md --- CHANGELOG.md | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a99c6fb..009c7ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,83 @@ All notable changes to the library will be documented in this file. The format of the file is based on [Keep a Changelog](http://keepachangelog.com/) and this library adheres to [Semantic Versioning](http://semver.org/) as mentioned in [README.md][readme] file. +## [ [6.4.0](https://github.com/infobip/infobip-api-java-client/releases/tag/6.4.0) ] - 2026-03-26 + +⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes. +All changes, including breaking changes, are addressed and explained in the list bellow. +If you find out that something was not addressed properly, please submit an issue. + +### Added +* Support for [Infobip Numbers API](https://www.infobip.com/docs/api/platform/numbers). +* Support for [Infobip Resources API](https://www.infobip.com/docs/api/platform/resources). +* Most recent feature set for: + * [Infobip WhatsApp API](https://www.infobip.com/docs/api/channels/whatsapp). + * [Infobip RCS API](https://www.infobip.com/docs/api/channels/rcs). + * [Infobip Voice API](https://www.infobip.com/docs/api/channels/voice). + * [Infobip Messages API](https://www.infobip.com/docs/api/platform/messages-api). + * [Infobip WebRTC API](https://www.infobip.com/docs/api/channels/webrtc-calls). + +### Changed + +* **WhatsApp**: + * Added Media Carousel message support with `WhatsAppInteractiveMediaCarouselMessage`, `WhatsAppMediaCarouselCard`, `WhatsAppImageMediaCarouselCardHeader`, `WhatsAppVideoMediaCarouselCardHeader` models + * Added Voice button message support with `WhatsAppInteractiveVoiceButtonMessage` and `WhatsAppInteractiveVoiceButtonContent` models + * Added calling permission support with `WhatsAppCallingPermissionAction`, `WhatsAppCallingPermissionActionLimit`, `WhatsAppCallingPermissionResponse` and `WhatsAppInteractiveCallPermissionRequestMessage` models + * Added outbound event support (typing indicator) with `WhatsAppEvent`, `WhatsAppEventRequest`, `WhatsAppEventOptions`, `WhatsAppOutboundEventTypingIndicatorContent` models + * Added Meta conversion tracking support with `WhatsAppMetaConversionModel`, `WhatsAppMetaConversionType`, `WhatsAppWABAConversionEventRequest`, `WhatsAppConversionDetails` models + * Added marketing update notification support with `WhatsAppWebhookMarketingUpdateNotification` and `WhatsAppWebhookMarketingUpdateNotificationResponse` models + * Added message scheduling support with `WhatsAppRequestSchedulingSettings` model + * Added `WhatsAppTemplateVoiceCallButtonContent` model for voice call template button support + * Added `WhatsAppMessageStatus`, `WhatsAppMessageGeneralStatus`, `WhatsAppSenderPublicKeyResponse`, `WhatsAppShareWabaRequest`, `WhatsAppToDestination` models + * Extended `WhatsAppTemplateButtonContent` with voice call button type support + * Extended `WhatsAppPayment` with additional fields + * Extended `WhatsAppTemplateApiResponse` and `WhatsAppVoiceCallButtonApiData` with new fields + * JavaDoc fixes +* **RCS**: + * Renamed `RcsInboundMessageContent` to `RcsInboundMessage` + * Renamed `RcsMessageEventContent` to `RcsInboundEvent` + * Removed `RcsPlatformInfo` class + * Added conversation started event support with `RcsConversationStartedEvent`, `RcsConversationStartedEvents`, `RcsConversationStartedInfo`, `RcsConversationStartedEventContent`, `RcsConversationInfo` models + * Added `RcsConversationType`, `RcsConversationStartedEventType`, `RcsTrafficType`, `RcsMessagePrice`, `RcsMessageInteractionType`, `RcsEventInteractionType` models + * Updated `RcsWebhookDeliveryReport` model + * JavaDoc fixes +* **Voice**: + * Renamed `CallsDialogRecording` to `CallsDialogRecordingResponse` + * Renamed `CallsSipTrunkRegisteredResetPasswordResponse` to `CallsSipTrunkResetPasswordResponse` + * Removed `CallsPublicDialogRecording` class + * Added CNAM support with `CallsCnam`, `CallsCnamDelivery`, `CallsCnamDeliveryStatus`, `CallsCnamStorage`, `CallsCnamStorageStatus`, `CallsPublicCnamStatus` models + * Added emergency address support with `CallsEmergencyAddress`, `CallsEmergencyAddressStatus`, `CallsValidateAddressResponse` models + * Added TTY play content support with `CallsPlayTty`, `CallsPlayTtyOptions`, `CallsTtyPlayContent` models + * Added `CallsAddress`, `CallsDirection` models + * Extended `CallsLanguage` and `CallsSynthesisVoice` with new language and voice options + * Extended `CallsDialogPlayRequest` with new fields + * Extended `CallsUrlPlayContent` with new fields + * Updated `CallsDialogRecordingPage` to reference `CallsDialogRecordingResponse` + * JavaDoc fixes +* **MessagesApi**: + * Added outbound seen event support with `MessagesApiOutboundSeenEvent` and `MessagesApiOutboundSeenEventChannel` models + * Added outbound typing event channel support with `MessagesApiOutboundTypingStartedEventChannel` and `MessagesApiOutboundTypingStoppedEventChannel` models + * Added `MessagesApiInboundTypingStartedChannel` model + * Extended `MessagesApiOutboundEventType` with new event type values + * Updated `MessagesApiInboundDlrChannel`, `MessagesApiInboundTypingStartedEvent`, `MessagesApiInboundTypingStoppedEvent`, `MessagesApiOutboundTypingStartedEvent`, `MessagesApiOutboundTypingStoppedEvent` models + * Extended `MessagesApiOutboundEvent` with new fields + * JavaDoc fixes +* **WebRtc**: + * Added machine detection support with `WebRtcMachineDetection` and `WebRtcMachineDetectionResult` models + * Extended `WebRtcPhoneCallDetails` and `WebRtcPhoneDestination` with new fields + * Updated `WebRtcHangupSource` enum + * JavaDoc fixes +* **Viber**: + * Extended `ViberOtpTemplateLanguage` with new language options + * Extended `ViberOutboundOtpTemplateContent` with new fields + * JavaDoc fixes +* **General**: + * Updated tests + +### Removed +- Removed `RcsPlatformInfo` class — its `applicationId` and `entityId` fields are now carried by the existing `Platform` class, which is used consistently across the SDK for platform context +- Removed `CallsPublicDialogRecording` class — unified with `CallsDialogRecordingResponse`, which represents the same dialog recording data and is now the single type returned from dialog recording endpoints + ## [ [6.3.0](https://github.com/infobip/infobip-api-java-client/releases/tag/6.3.0) ] - 2026-02-17 ⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes. From 3cfc0d21135138ad4cc09dade8827acceff2f3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Mon, 30 Mar 2026 16:52:58 +0200 Subject: [PATCH 4/9] Updated models. --- CHANGELOG.md | 10 +- README.md | 3 + src/main/java/com/infobip/api/CallsApi.java | 22 ++--- .../model/CallsDialogRecordingPage.java | 10 +- ...e.java => CallsPublicDialogRecording.java} | 58 +++++------ ...InboundMessageRcsInboundEventContent.java} | 91 ++++++++--------- ...boundMessageRcsInboundMessageContent.java} | 97 ++++++++++--------- .../com/infobip/model/RcsInboundEvents.java | 10 +- .../com/infobip/model/RcsInboundMessages.java | 10 +- 9 files changed, 155 insertions(+), 156 deletions(-) rename src/main/java/com/infobip/model/{CallsDialogRecordingResponse.java => CallsPublicDialogRecording.java} (80%) rename src/main/java/com/infobip/model/{RcsInboundEvent.java => InboundMessageRcsInboundEventContent.java} (80%) rename src/main/java/com/infobip/model/{RcsInboundMessage.java => InboundMessageRcsInboundMessageContent.java} (80%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 009c7ce..421f40a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,17 +38,13 @@ If you find out that something was not addressed properly, please submit an issu * Extended `WhatsAppTemplateApiResponse` and `WhatsAppVoiceCallButtonApiData` with new fields * JavaDoc fixes * **RCS**: - * Renamed `RcsInboundMessageContent` to `RcsInboundMessage` - * Renamed `RcsMessageEventContent` to `RcsInboundEvent` - * Removed `RcsPlatformInfo` class + * Removed `RcsPlatformInfo` class (see [Removed](#removed) section) * Added conversation started event support with `RcsConversationStartedEvent`, `RcsConversationStartedEvents`, `RcsConversationStartedInfo`, `RcsConversationStartedEventContent`, `RcsConversationInfo` models * Added `RcsConversationType`, `RcsConversationStartedEventType`, `RcsTrafficType`, `RcsMessagePrice`, `RcsMessageInteractionType`, `RcsEventInteractionType` models * Updated `RcsWebhookDeliveryReport` model * JavaDoc fixes * **Voice**: - * Renamed `CallsDialogRecording` to `CallsDialogRecordingResponse` - * Renamed `CallsSipTrunkRegisteredResetPasswordResponse` to `CallsSipTrunkResetPasswordResponse` - * Removed `CallsPublicDialogRecording` class + * Renamed `CallsSipTrunkRegisteredResetPasswordResponse` to `CallsSipTrunkResetPasswordResponse` to better reflect the return type of the reset password endpoint * Added CNAM support with `CallsCnam`, `CallsCnamDelivery`, `CallsCnamDeliveryStatus`, `CallsCnamStorage`, `CallsCnamStorageStatus`, `CallsPublicCnamStatus` models * Added emergency address support with `CallsEmergencyAddress`, `CallsEmergencyAddressStatus`, `CallsValidateAddressResponse` models * Added TTY play content support with `CallsPlayTty`, `CallsPlayTtyOptions`, `CallsTtyPlayContent` models @@ -56,7 +52,6 @@ If you find out that something was not addressed properly, please submit an issu * Extended `CallsLanguage` and `CallsSynthesisVoice` with new language and voice options * Extended `CallsDialogPlayRequest` with new fields * Extended `CallsUrlPlayContent` with new fields - * Updated `CallsDialogRecordingPage` to reference `CallsDialogRecordingResponse` * JavaDoc fixes * **MessagesApi**: * Added outbound seen event support with `MessagesApiOutboundSeenEvent` and `MessagesApiOutboundSeenEventChannel` models @@ -80,7 +75,6 @@ If you find out that something was not addressed properly, please submit an issu ### Removed - Removed `RcsPlatformInfo` class — its `applicationId` and `entityId` fields are now carried by the existing `Platform` class, which is used consistently across the SDK for platform context -- Removed `CallsPublicDialogRecording` class — unified with `CallsDialogRecordingResponse`, which represents the same dialog recording data and is now the single type returned from dialog recording endpoints ## [ [6.3.0](https://github.com/infobip/infobip-api-java-client/releases/tag/6.3.0) ] - 2026-02-17 diff --git a/README.md b/README.md index 7505d43..7cadea0 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,9 @@ The current version of this library includes this subset of Infobip products: * [Viber](https://www.infobip.com/docs/api/channels/viber) * [Messages API](https://www.infobip.com/docs/api/platform/messages-api) * [Moments API](https://www.infobip.com/docs/api/customer-engagement/moments) +* [RCS](https://www.infobip.com/docs/api/channels/rcs) +* [Numbers](https://www.infobip.com/docs/api/platform/numbers) +* [Resources](https://www.infobip.com/docs/api/platform/resources) ## General Info For `infobip-api-java-client` versioning we use [Semantic Versioning][semver] scheme. diff --git a/src/main/java/com/infobip/api/CallsApi.java b/src/main/java/com/infobip/api/CallsApi.java index 357c001..58c462a 100644 --- a/src/main/java/com/infobip/api/CallsApi.java +++ b/src/main/java/com/infobip/api/CallsApi.java @@ -56,7 +56,6 @@ import com.infobip.model.CallsDialogPlayRequest; import com.infobip.model.CallsDialogRecordingPage; import com.infobip.model.CallsDialogRecordingRequest; -import com.infobip.model.CallsDialogRecordingResponse; import com.infobip.model.CallsDialogRequest; import com.infobip.model.CallsDialogResponse; import com.infobip.model.CallsDialogSayRequest; @@ -76,6 +75,7 @@ import com.infobip.model.CallsPreAnswerRequest; import com.infobip.model.CallsPublicConferenceRecording; import com.infobip.model.CallsPublicCountry; +import com.infobip.model.CallsPublicDialogRecording; import com.infobip.model.CallsPublicRecording; import com.infobip.model.CallsPublicRecordingFile; import com.infobip.model.CallsPublicRegion; @@ -2828,13 +2828,13 @@ public DeleteDialogRecordingsRequest location(CallsRecordingLocation location) { /** * Executes the deleteDialogRecordings request. * - * @return CallsDialogRecordingResponse The deserialized response. + * @return CallsPublicDialogRecording The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsDialogRecordingResponse execute() throws ApiException { + public CallsPublicDialogRecording execute() throws ApiException { RequestDefinition deleteDialogRecordingsDefinition = deleteDialogRecordingsDefinition(dialogId, location); return apiClient.execute( - deleteDialogRecordingsDefinition, new TypeReference() {}.getType()); + deleteDialogRecordingsDefinition, new TypeReference() {}.getType()); } /** @@ -2843,11 +2843,11 @@ public CallsDialogRecordingResponse execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition deleteDialogRecordingsDefinition = deleteDialogRecordingsDefinition(dialogId, location); return apiClient.executeAsync( deleteDialogRecordingsDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } @@ -6015,13 +6015,13 @@ public GetDialogRecordingsRequest location(CallsRecordingLocation location) { /** * Executes the getDialogRecordings request. * - * @return CallsDialogRecordingResponse The deserialized response. + * @return CallsPublicDialogRecording The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsDialogRecordingResponse execute() throws ApiException { + public CallsPublicDialogRecording execute() throws ApiException { RequestDefinition getDialogRecordingsDefinition = getDialogRecordingsDefinition(dialogId, location); return apiClient.execute( - getDialogRecordingsDefinition, new TypeReference() {}.getType()); + getDialogRecordingsDefinition, new TypeReference() {}.getType()); } /** @@ -6030,11 +6030,11 @@ public CallsDialogRecordingResponse execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition getDialogRecordingsDefinition = getDialogRecordingsDefinition(dialogId, location); return apiClient.executeAsync( getDialogRecordingsDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingPage.java b/src/main/java/com/infobip/model/CallsDialogRecordingPage.java index 8383227..9ccb8ef 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecordingPage.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingPage.java @@ -19,7 +19,7 @@ */ public class CallsDialogRecordingPage { - private List results = null; + private List results = null; private PageInfo paging; @@ -32,7 +32,7 @@ public class CallsDialogRecordingPage { * @param results * @return This {@link CallsDialogRecordingPage instance}. */ - public CallsDialogRecordingPage results(List results) { + public CallsDialogRecordingPage results(List results) { this.results = results; return this; } @@ -46,7 +46,7 @@ public CallsDialogRecordingPage results(List resul * @param resultsItem The item to be added to the list. * @return This {@link CallsDialogRecordingPage instance}. */ - public CallsDialogRecordingPage addResultsItem(CallsDialogRecordingResponse resultsItem) { + public CallsDialogRecordingPage addResultsItem(CallsPublicDialogRecording resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -63,7 +63,7 @@ public CallsDialogRecordingPage addResultsItem(CallsDialogRecordingResponse resu * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -76,7 +76,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java b/src/main/java/com/infobip/model/CallsPublicDialogRecording.java similarity index 80% rename from src/main/java/com/infobip/model/CallsDialogRecordingResponse.java rename to src/main/java/com/infobip/model/CallsPublicDialogRecording.java index 9ebd5f7..d7a81f0 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java +++ b/src/main/java/com/infobip/model/CallsPublicDialogRecording.java @@ -16,9 +16,9 @@ import java.util.Objects; /** - * Represents CallsDialogRecordingResponse model. + * Represents CallsPublicDialogRecording model. */ -public class CallsDialogRecordingResponse { +public class CallsPublicDialogRecording { private String dialogId; @@ -41,9 +41,9 @@ public class CallsDialogRecordingResponse { * Unique dialog ID. * * @param dialogId - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse dialogId(String dialogId) { + public CallsPublicDialogRecording dialogId(String dialogId) { this.dialogId = dialogId; return this; } @@ -81,9 +81,9 @@ public void setDialogId(String dialogId) { * Calls Configuration ID. * * @param callsConfigurationId - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse callsConfigurationId(String callsConfigurationId) { + public CallsPublicDialogRecording callsConfigurationId(String callsConfigurationId) { this.callsConfigurationId = callsConfigurationId; return this; } @@ -118,9 +118,9 @@ public void setCallsConfigurationId(String callsConfigurationId) { * Sets platform. * * @param platform - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse platform(Platform platform) { + public CallsPublicDialogRecording platform(Platform platform) { this.platform = platform; return this; } @@ -152,9 +152,9 @@ public void setPlatform(Platform platform) { * File(s) with a recording of both dialog participants. * * @param composedFiles - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse composedFiles(List composedFiles) { + public CallsPublicDialogRecording composedFiles(List composedFiles) { this.composedFiles = composedFiles; return this; } @@ -166,9 +166,9 @@ public CallsDialogRecordingResponse composedFiles(List * File(s) with a recording of both dialog participants. * * @param composedFilesItem The item to be added to the list. - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse addComposedFilesItem(CallsPublicRecordingFile composedFilesItem) { + public CallsPublicDialogRecording addComposedFilesItem(CallsPublicRecordingFile composedFilesItem) { if (this.composedFiles == null) { this.composedFiles = new ArrayList<>(); } @@ -209,9 +209,9 @@ public void setComposedFiles(List composedFiles) { * File(s) with a recording of one dialog participant. * * @param callRecordings - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse callRecordings(List callRecordings) { + public CallsPublicDialogRecording callRecordings(List callRecordings) { this.callRecordings = callRecordings; return this; } @@ -223,9 +223,9 @@ public CallsDialogRecordingResponse callRecordings(List ca * File(s) with a recording of one dialog participant. * * @param callRecordingsItem The item to be added to the list. - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse addCallRecordingsItem(CallsPublicRecording callRecordingsItem) { + public CallsPublicDialogRecording addCallRecordingsItem(CallsPublicRecording callRecordingsItem) { if (this.callRecordings == null) { this.callRecordings = new ArrayList<>(); } @@ -266,9 +266,9 @@ public void setCallRecordings(List callRecordings) { * Date and time when the (first) recording started. * * @param startTime - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse startTime(OffsetDateTime startTime) { + public CallsPublicDialogRecording startTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -306,9 +306,9 @@ public void setStartTime(OffsetDateTime startTime) { * Date and time when the (last) recording ended. * * @param endTime - * @return This {@link CallsDialogRecordingResponse instance}. + * @return This {@link CallsPublicDialogRecording instance}. */ - public CallsDialogRecordingResponse endTime(OffsetDateTime endTime) { + public CallsPublicDialogRecording endTime(OffsetDateTime endTime) { this.endTime = endTime; return this; } @@ -347,14 +347,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CallsDialogRecordingResponse callsDialogRecordingResponse = (CallsDialogRecordingResponse) o; - return Objects.equals(this.dialogId, callsDialogRecordingResponse.dialogId) - && Objects.equals(this.callsConfigurationId, callsDialogRecordingResponse.callsConfigurationId) - && Objects.equals(this.platform, callsDialogRecordingResponse.platform) - && Objects.equals(this.composedFiles, callsDialogRecordingResponse.composedFiles) - && Objects.equals(this.callRecordings, callsDialogRecordingResponse.callRecordings) - && Objects.equals(this.startTime, callsDialogRecordingResponse.startTime) - && Objects.equals(this.endTime, callsDialogRecordingResponse.endTime); + CallsPublicDialogRecording callsPublicDialogRecording = (CallsPublicDialogRecording) o; + return Objects.equals(this.dialogId, callsPublicDialogRecording.dialogId) + && Objects.equals(this.callsConfigurationId, callsPublicDialogRecording.callsConfigurationId) + && Objects.equals(this.platform, callsPublicDialogRecording.platform) + && Objects.equals(this.composedFiles, callsPublicDialogRecording.composedFiles) + && Objects.equals(this.callRecordings, callsPublicDialogRecording.callRecordings) + && Objects.equals(this.startTime, callsPublicDialogRecording.startTime) + && Objects.equals(this.endTime, callsPublicDialogRecording.endTime); } @Override @@ -367,7 +367,7 @@ public int hashCode() { public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class CallsDialogRecordingResponse {") + .append("class CallsPublicDialogRecording {") .append(newLine) .append(" dialogId: ") .append(toIndentedString(dialogId)) diff --git a/src/main/java/com/infobip/model/RcsInboundEvent.java b/src/main/java/com/infobip/model/InboundMessageRcsInboundEventContent.java similarity index 80% rename from src/main/java/com/infobip/model/RcsInboundEvent.java rename to src/main/java/com/infobip/model/InboundMessageRcsInboundEventContent.java index 3c67c47..187f533 100644 --- a/src/main/java/com/infobip/model/RcsInboundEvent.java +++ b/src/main/java/com/infobip/model/InboundMessageRcsInboundEventContent.java @@ -16,7 +16,7 @@ /** * Collection of mobile originated events. */ -public class RcsInboundEvent { +public class InboundMessageRcsInboundEventContent { private String campaignReferenceId; @@ -53,9 +53,9 @@ public class RcsInboundEvent { * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * * @param campaignReferenceId - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent campaignReferenceId(String campaignReferenceId) { + public InboundMessageRcsInboundEventContent campaignReferenceId(String campaignReferenceId) { this.campaignReferenceId = campaignReferenceId; return this; } @@ -95,9 +95,9 @@ public void setCampaignReferenceId(String campaignReferenceId) { * The field is required. * * @param sender - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent sender(String sender) { + public InboundMessageRcsInboundEventContent sender(String sender) { this.sender = sender; return this; } @@ -141,9 +141,9 @@ public void setSender(String sender) { * The field is required. * * @param to - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent to(String to) { + public InboundMessageRcsInboundEventContent to(String to) { this.to = to; return this; } @@ -187,9 +187,9 @@ public void setTo(String to) { * The field is required. * * @param integrationType - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent integrationType(String integrationType) { + public InboundMessageRcsInboundEventContent integrationType(String integrationType) { this.integrationType = integrationType; return this; } @@ -233,9 +233,9 @@ public void setIntegrationType(String integrationType) { * The field is required. * * @param receivedAt - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent receivedAt(OffsetDateTime receivedAt) { + public InboundMessageRcsInboundEventContent receivedAt(OffsetDateTime receivedAt) { this.receivedAt = receivedAt; return this; } @@ -276,9 +276,9 @@ public void setReceivedAt(OffsetDateTime receivedAt) { * The field is required. * * @param interactionType - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent interactionType(RcsEventInteractionType interactionType) { + public InboundMessageRcsInboundEventContent interactionType(RcsEventInteractionType interactionType) { this.interactionType = interactionType; return this; } @@ -314,9 +314,9 @@ public void setInteractionType(RcsEventInteractionType interactionType) { * Keyword extracted from the message text. * * @param keyword - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent keyword(String keyword) { + public InboundMessageRcsInboundEventContent keyword(String keyword) { this.keyword = keyword; return this; } @@ -356,9 +356,9 @@ public void setKeyword(String keyword) { * The field is required. * * @param messageId - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent messageId(String messageId) { + public InboundMessageRcsInboundEventContent messageId(String messageId) { this.messageId = messageId; return this; } @@ -400,9 +400,9 @@ public void setMessageId(String messageId) { * Message ID of paired outgoing message if matched by Infobip platform. * * @param pairedMessageId - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent pairedMessageId(String pairedMessageId) { + public InboundMessageRcsInboundEventContent pairedMessageId(String pairedMessageId) { this.pairedMessageId = pairedMessageId; return this; } @@ -440,9 +440,9 @@ public void setPairedMessageId(String pairedMessageId) { * Callback data sent through ‛callbackData‛ field when sending message. * * @param callbackData - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent callbackData(String callbackData) { + public InboundMessageRcsInboundEventContent callbackData(String callbackData) { this.callbackData = callbackData; return this; } @@ -479,9 +479,9 @@ public void setCallbackData(String callbackData) { * The field is required. * * @param message - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent message(RcsInboundMessageContent message) { + public InboundMessageRcsInboundEventContent message(RcsInboundMessageContent message) { this.message = message; return this; } @@ -516,9 +516,9 @@ public void setMessage(RcsInboundMessageContent message) { * The field is required. * * @param price - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent price(RcsMessagePrice price) { + public InboundMessageRcsInboundEventContent price(RcsMessagePrice price) { this.price = price; return this; } @@ -553,9 +553,9 @@ public void setPrice(RcsMessagePrice price) { * The field is required. * * @param conversation - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent conversation(RcsConversationInfo conversation) { + public InboundMessageRcsInboundEventContent conversation(RcsConversationInfo conversation) { this.conversation = conversation; return this; } @@ -590,9 +590,9 @@ public void setConversation(RcsConversationInfo conversation) { * The field is required. * * @param platform - * @return This {@link RcsInboundEvent instance}. + * @return This {@link InboundMessageRcsInboundEventContent instance}. */ - public RcsInboundEvent platform(Platform platform) { + public InboundMessageRcsInboundEventContent platform(Platform platform) { this.platform = platform; return this; } @@ -629,21 +629,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RcsInboundEvent rcsInboundEvent = (RcsInboundEvent) o; - return Objects.equals(this.campaignReferenceId, rcsInboundEvent.campaignReferenceId) - && Objects.equals(this.sender, rcsInboundEvent.sender) - && Objects.equals(this.to, rcsInboundEvent.to) - && Objects.equals(this.integrationType, rcsInboundEvent.integrationType) - && Objects.equals(this.receivedAt, rcsInboundEvent.receivedAt) - && Objects.equals(this.interactionType, rcsInboundEvent.interactionType) - && Objects.equals(this.keyword, rcsInboundEvent.keyword) - && Objects.equals(this.messageId, rcsInboundEvent.messageId) - && Objects.equals(this.pairedMessageId, rcsInboundEvent.pairedMessageId) - && Objects.equals(this.callbackData, rcsInboundEvent.callbackData) - && Objects.equals(this.message, rcsInboundEvent.message) - && Objects.equals(this.price, rcsInboundEvent.price) - && Objects.equals(this.conversation, rcsInboundEvent.conversation) - && Objects.equals(this.platform, rcsInboundEvent.platform); + InboundMessageRcsInboundEventContent inboundMessageRcsInboundEventContent = + (InboundMessageRcsInboundEventContent) o; + return Objects.equals(this.campaignReferenceId, inboundMessageRcsInboundEventContent.campaignReferenceId) + && Objects.equals(this.sender, inboundMessageRcsInboundEventContent.sender) + && Objects.equals(this.to, inboundMessageRcsInboundEventContent.to) + && Objects.equals(this.integrationType, inboundMessageRcsInboundEventContent.integrationType) + && Objects.equals(this.receivedAt, inboundMessageRcsInboundEventContent.receivedAt) + && Objects.equals(this.interactionType, inboundMessageRcsInboundEventContent.interactionType) + && Objects.equals(this.keyword, inboundMessageRcsInboundEventContent.keyword) + && Objects.equals(this.messageId, inboundMessageRcsInboundEventContent.messageId) + && Objects.equals(this.pairedMessageId, inboundMessageRcsInboundEventContent.pairedMessageId) + && Objects.equals(this.callbackData, inboundMessageRcsInboundEventContent.callbackData) + && Objects.equals(this.message, inboundMessageRcsInboundEventContent.message) + && Objects.equals(this.price, inboundMessageRcsInboundEventContent.price) + && Objects.equals(this.conversation, inboundMessageRcsInboundEventContent.conversation) + && Objects.equals(this.platform, inboundMessageRcsInboundEventContent.platform); } @Override @@ -669,7 +670,7 @@ public int hashCode() { public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class RcsInboundEvent {") + .append("class InboundMessageRcsInboundEventContent {") .append(newLine) .append(" campaignReferenceId: ") .append(toIndentedString(campaignReferenceId)) diff --git a/src/main/java/com/infobip/model/RcsInboundMessage.java b/src/main/java/com/infobip/model/InboundMessageRcsInboundMessageContent.java similarity index 80% rename from src/main/java/com/infobip/model/RcsInboundMessage.java rename to src/main/java/com/infobip/model/InboundMessageRcsInboundMessageContent.java index a435fc0..110ea49 100644 --- a/src/main/java/com/infobip/model/RcsInboundMessage.java +++ b/src/main/java/com/infobip/model/InboundMessageRcsInboundMessageContent.java @@ -16,7 +16,7 @@ /** * Collection of mobile originated messages. */ -public class RcsInboundMessage { +public class InboundMessageRcsInboundMessageContent { private String campaignReferenceId; @@ -55,9 +55,9 @@ public class RcsInboundMessage { * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * * @param campaignReferenceId - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage campaignReferenceId(String campaignReferenceId) { + public InboundMessageRcsInboundMessageContent campaignReferenceId(String campaignReferenceId) { this.campaignReferenceId = campaignReferenceId; return this; } @@ -97,9 +97,9 @@ public void setCampaignReferenceId(String campaignReferenceId) { * The field is required. * * @param sender - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage sender(String sender) { + public InboundMessageRcsInboundMessageContent sender(String sender) { this.sender = sender; return this; } @@ -143,9 +143,9 @@ public void setSender(String sender) { * The field is required. * * @param to - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage to(String to) { + public InboundMessageRcsInboundMessageContent to(String to) { this.to = to; return this; } @@ -189,9 +189,9 @@ public void setTo(String to) { * The field is required. * * @param integrationType - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage integrationType(String integrationType) { + public InboundMessageRcsInboundMessageContent integrationType(String integrationType) { this.integrationType = integrationType; return this; } @@ -235,9 +235,9 @@ public void setIntegrationType(String integrationType) { * The field is required. * * @param receivedAt - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage receivedAt(OffsetDateTime receivedAt) { + public InboundMessageRcsInboundMessageContent receivedAt(OffsetDateTime receivedAt) { this.receivedAt = receivedAt; return this; } @@ -278,9 +278,9 @@ public void setReceivedAt(OffsetDateTime receivedAt) { * The field is required. * * @param interactionType - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage interactionType(RcsMessageInteractionType interactionType) { + public InboundMessageRcsInboundMessageContent interactionType(RcsMessageInteractionType interactionType) { this.interactionType = interactionType; return this; } @@ -318,9 +318,9 @@ public void setInteractionType(RcsMessageInteractionType interactionType) { * The field is required. * * @param rcsCount - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage rcsCount(Integer rcsCount) { + public InboundMessageRcsInboundMessageContent rcsCount(Integer rcsCount) { this.rcsCount = rcsCount; return this; } @@ -362,9 +362,9 @@ public void setRcsCount(Integer rcsCount) { * Keyword extracted from the message text. * * @param keyword - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage keyword(String keyword) { + public InboundMessageRcsInboundMessageContent keyword(String keyword) { this.keyword = keyword; return this; } @@ -404,9 +404,9 @@ public void setKeyword(String keyword) { * The field is required. * * @param messageId - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage messageId(String messageId) { + public InboundMessageRcsInboundMessageContent messageId(String messageId) { this.messageId = messageId; return this; } @@ -448,9 +448,9 @@ public void setMessageId(String messageId) { * Message ID of paired outgoing message if matched by Infobip platform. * * @param pairedMessageId - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage pairedMessageId(String pairedMessageId) { + public InboundMessageRcsInboundMessageContent pairedMessageId(String pairedMessageId) { this.pairedMessageId = pairedMessageId; return this; } @@ -488,9 +488,9 @@ public void setPairedMessageId(String pairedMessageId) { * Callback data sent through ‛callbackData‛ field when sending message. * * @param callbackData - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage callbackData(String callbackData) { + public InboundMessageRcsInboundMessageContent callbackData(String callbackData) { this.callbackData = callbackData; return this; } @@ -527,9 +527,9 @@ public void setCallbackData(String callbackData) { * The field is required. * * @param message - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage message(RcsInboundMessageContent message) { + public InboundMessageRcsInboundMessageContent message(RcsInboundMessageContent message) { this.message = message; return this; } @@ -564,9 +564,9 @@ public void setMessage(RcsInboundMessageContent message) { * The field is required. * * @param price - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage price(RcsMessagePrice price) { + public InboundMessageRcsInboundMessageContent price(RcsMessagePrice price) { this.price = price; return this; } @@ -601,9 +601,9 @@ public void setPrice(RcsMessagePrice price) { * The field is required. * * @param conversation - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage conversation(RcsConversationInfo conversation) { + public InboundMessageRcsInboundMessageContent conversation(RcsConversationInfo conversation) { this.conversation = conversation; return this; } @@ -638,9 +638,9 @@ public void setConversation(RcsConversationInfo conversation) { * The field is required. * * @param platform - * @return This {@link RcsInboundMessage instance}. + * @return This {@link InboundMessageRcsInboundMessageContent instance}. */ - public RcsInboundMessage platform(Platform platform) { + public InboundMessageRcsInboundMessageContent platform(Platform platform) { this.platform = platform; return this; } @@ -677,22 +677,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RcsInboundMessage rcsInboundMessage = (RcsInboundMessage) o; - return Objects.equals(this.campaignReferenceId, rcsInboundMessage.campaignReferenceId) - && Objects.equals(this.sender, rcsInboundMessage.sender) - && Objects.equals(this.to, rcsInboundMessage.to) - && Objects.equals(this.integrationType, rcsInboundMessage.integrationType) - && Objects.equals(this.receivedAt, rcsInboundMessage.receivedAt) - && Objects.equals(this.interactionType, rcsInboundMessage.interactionType) - && Objects.equals(this.rcsCount, rcsInboundMessage.rcsCount) - && Objects.equals(this.keyword, rcsInboundMessage.keyword) - && Objects.equals(this.messageId, rcsInboundMessage.messageId) - && Objects.equals(this.pairedMessageId, rcsInboundMessage.pairedMessageId) - && Objects.equals(this.callbackData, rcsInboundMessage.callbackData) - && Objects.equals(this.message, rcsInboundMessage.message) - && Objects.equals(this.price, rcsInboundMessage.price) - && Objects.equals(this.conversation, rcsInboundMessage.conversation) - && Objects.equals(this.platform, rcsInboundMessage.platform); + InboundMessageRcsInboundMessageContent inboundMessageRcsInboundMessageContent = + (InboundMessageRcsInboundMessageContent) o; + return Objects.equals(this.campaignReferenceId, inboundMessageRcsInboundMessageContent.campaignReferenceId) + && Objects.equals(this.sender, inboundMessageRcsInboundMessageContent.sender) + && Objects.equals(this.to, inboundMessageRcsInboundMessageContent.to) + && Objects.equals(this.integrationType, inboundMessageRcsInboundMessageContent.integrationType) + && Objects.equals(this.receivedAt, inboundMessageRcsInboundMessageContent.receivedAt) + && Objects.equals(this.interactionType, inboundMessageRcsInboundMessageContent.interactionType) + && Objects.equals(this.rcsCount, inboundMessageRcsInboundMessageContent.rcsCount) + && Objects.equals(this.keyword, inboundMessageRcsInboundMessageContent.keyword) + && Objects.equals(this.messageId, inboundMessageRcsInboundMessageContent.messageId) + && Objects.equals(this.pairedMessageId, inboundMessageRcsInboundMessageContent.pairedMessageId) + && Objects.equals(this.callbackData, inboundMessageRcsInboundMessageContent.callbackData) + && Objects.equals(this.message, inboundMessageRcsInboundMessageContent.message) + && Objects.equals(this.price, inboundMessageRcsInboundMessageContent.price) + && Objects.equals(this.conversation, inboundMessageRcsInboundMessageContent.conversation) + && Objects.equals(this.platform, inboundMessageRcsInboundMessageContent.platform); } @Override @@ -719,7 +720,7 @@ public int hashCode() { public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class RcsInboundMessage {") + .append("class InboundMessageRcsInboundMessageContent {") .append(newLine) .append(" campaignReferenceId: ") .append(toIndentedString(campaignReferenceId)) diff --git a/src/main/java/com/infobip/model/RcsInboundEvents.java b/src/main/java/com/infobip/model/RcsInboundEvents.java index 2375bd0..73b7696 100644 --- a/src/main/java/com/infobip/model/RcsInboundEvents.java +++ b/src/main/java/com/infobip/model/RcsInboundEvents.java @@ -19,7 +19,7 @@ */ public class RcsInboundEvents { - private List results = new ArrayList<>(); + private List results = new ArrayList<>(); private Integer messageCount; @@ -36,7 +36,7 @@ public class RcsInboundEvents { * @param results * @return This {@link RcsInboundEvents instance}. */ - public RcsInboundEvents results(List results) { + public RcsInboundEvents results(List results) { this.results = results; return this; } @@ -52,7 +52,7 @@ public RcsInboundEvents results(List results) { * @param resultsItem The item to be added to the list. * @return This {@link RcsInboundEvents instance}. */ - public RcsInboundEvents addResultsItem(RcsInboundEvent resultsItem) { + public RcsInboundEvents addResultsItem(InboundMessageRcsInboundEventContent resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -71,7 +71,7 @@ public RcsInboundEvents addResultsItem(RcsInboundEvent resultsItem) { * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -86,7 +86,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } diff --git a/src/main/java/com/infobip/model/RcsInboundMessages.java b/src/main/java/com/infobip/model/RcsInboundMessages.java index 2a5a416..b87ba82 100644 --- a/src/main/java/com/infobip/model/RcsInboundMessages.java +++ b/src/main/java/com/infobip/model/RcsInboundMessages.java @@ -19,7 +19,7 @@ */ public class RcsInboundMessages { - private List results = new ArrayList<>(); + private List results = new ArrayList<>(); private Integer messageCount; @@ -36,7 +36,7 @@ public class RcsInboundMessages { * @param results * @return This {@link RcsInboundMessages instance}. */ - public RcsInboundMessages results(List results) { + public RcsInboundMessages results(List results) { this.results = results; return this; } @@ -52,7 +52,7 @@ public RcsInboundMessages results(List results) { * @param resultsItem The item to be added to the list. * @return This {@link RcsInboundMessages instance}. */ - public RcsInboundMessages addResultsItem(RcsInboundMessage resultsItem) { + public RcsInboundMessages addResultsItem(InboundMessageRcsInboundMessageContent resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -71,7 +71,7 @@ public RcsInboundMessages addResultsItem(RcsInboundMessage resultsItem) { * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -86,7 +86,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } From e153e0430972253293c1502000bdb37422337dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Mon, 30 Mar 2026 17:57:12 +0200 Subject: [PATCH 5/9] Updated models. Again. --- ...lsDialogCompositionFinishedProperties.java | 8 +- .../CallsDialogRecordingReadyProperties.java | 8 +- ...java => CallsDialogRecordingResponse.java} | 64 ++++++------ .../com/infobip/model/RcsInboundEvents.java | 10 +- ...ava => RcsInboundMessageEventContent.java} | 91 +++++++++-------- ...boundMessageRcsInboundMessageContent.java} | 98 +++++++++---------- .../com/infobip/model/RcsInboundMessages.java | 10 +- 7 files changed, 144 insertions(+), 145 deletions(-) rename src/main/java/com/infobip/model/{CallsDialogRecording.java => CallsDialogRecordingResponse.java} (80%) rename src/main/java/com/infobip/model/{InboundMessageRcsInboundEventContent.java => RcsInboundMessageEventContent.java} (80%) rename src/main/java/com/infobip/model/{InboundMessageRcsInboundMessageContent.java => RcsInboundMessageRcsInboundMessageContent.java} (79%) diff --git a/src/main/java/com/infobip/model/CallsDialogCompositionFinishedProperties.java b/src/main/java/com/infobip/model/CallsDialogCompositionFinishedProperties.java index 2db4dcb..6f179a8 100644 --- a/src/main/java/com/infobip/model/CallsDialogCompositionFinishedProperties.java +++ b/src/main/java/com/infobip/model/CallsDialogCompositionFinishedProperties.java @@ -17,7 +17,7 @@ */ public class CallsDialogCompositionFinishedProperties { - private CallsDialogRecording recording; + private CallsDialogRecordingResponse recording; /** * Sets recording. @@ -25,7 +25,7 @@ public class CallsDialogCompositionFinishedProperties { * @param recording * @return This {@link CallsDialogCompositionFinishedProperties instance}. */ - public CallsDialogCompositionFinishedProperties recording(CallsDialogRecording recording) { + public CallsDialogCompositionFinishedProperties recording(CallsDialogRecordingResponse recording) { this.recording = recording; return this; } @@ -36,7 +36,7 @@ public CallsDialogCompositionFinishedProperties recording(CallsDialogRecording r * @return recording */ @JsonProperty("recording") - public CallsDialogRecording getRecording() { + public CallsDialogRecordingResponse getRecording() { return recording; } @@ -46,7 +46,7 @@ public CallsDialogRecording getRecording() { * @param recording */ @JsonProperty("recording") - public void setRecording(CallsDialogRecording recording) { + public void setRecording(CallsDialogRecordingResponse recording) { this.recording = recording; } diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingReadyProperties.java b/src/main/java/com/infobip/model/CallsDialogRecordingReadyProperties.java index 34544ee..f11aaf1 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecordingReadyProperties.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingReadyProperties.java @@ -17,7 +17,7 @@ */ public class CallsDialogRecordingReadyProperties { - private CallsDialogRecording recording; + private CallsDialogRecordingResponse recording; /** * Sets recording. @@ -25,7 +25,7 @@ public class CallsDialogRecordingReadyProperties { * @param recording * @return This {@link CallsDialogRecordingReadyProperties instance}. */ - public CallsDialogRecordingReadyProperties recording(CallsDialogRecording recording) { + public CallsDialogRecordingReadyProperties recording(CallsDialogRecordingResponse recording) { this.recording = recording; return this; } @@ -36,7 +36,7 @@ public CallsDialogRecordingReadyProperties recording(CallsDialogRecording record * @return recording */ @JsonProperty("recording") - public CallsDialogRecording getRecording() { + public CallsDialogRecordingResponse getRecording() { return recording; } @@ -46,7 +46,7 @@ public CallsDialogRecording getRecording() { * @param recording */ @JsonProperty("recording") - public void setRecording(CallsDialogRecording recording) { + public void setRecording(CallsDialogRecordingResponse recording) { this.recording = recording; } diff --git a/src/main/java/com/infobip/model/CallsDialogRecording.java b/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java similarity index 80% rename from src/main/java/com/infobip/model/CallsDialogRecording.java rename to src/main/java/com/infobip/model/CallsDialogRecordingResponse.java index e691e6f..6a1b4c0 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecording.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java @@ -16,9 +16,9 @@ import java.util.Objects; /** - * Represents CallsDialogRecording model. + * Represents CallsDialogRecordingResponse model. */ -public class CallsDialogRecording { +public class CallsDialogRecordingResponse { private String dialogId; @@ -40,9 +40,9 @@ public class CallsDialogRecording { * Sets dialogId. * * @param dialogId - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording dialogId(String dialogId) { + public CallsDialogRecordingResponse dialogId(String dialogId) { this.dialogId = dialogId; return this; } @@ -71,9 +71,9 @@ public void setDialogId(String dialogId) { * Sets callsConfigurationId. * * @param callsConfigurationId - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording callsConfigurationId(String callsConfigurationId) { + public CallsDialogRecordingResponse callsConfigurationId(String callsConfigurationId) { this.callsConfigurationId = callsConfigurationId; return this; } @@ -102,9 +102,9 @@ public void setCallsConfigurationId(String callsConfigurationId) { * Sets applicationId. * * @param applicationId - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording applicationId(String applicationId) { + public CallsDialogRecordingResponse applicationId(String applicationId) { this.applicationId = applicationId; return this; } @@ -133,9 +133,9 @@ public void setApplicationId(String applicationId) { * Sets entityId. * * @param entityId - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording entityId(String entityId) { + public CallsDialogRecordingResponse entityId(String entityId) { this.entityId = entityId; return this; } @@ -164,9 +164,9 @@ public void setEntityId(String entityId) { * Sets composedFiles. * * @param composedFiles - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording composedFiles(List composedFiles) { + public CallsDialogRecordingResponse composedFiles(List composedFiles) { this.composedFiles = composedFiles; return this; } @@ -175,9 +175,9 @@ public CallsDialogRecording composedFiles(List composedFiles * Adds and item into composedFiles. * * @param composedFilesItem The item to be added to the list. - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording addComposedFilesItem(CallsRecordingFile composedFilesItem) { + public CallsDialogRecordingResponse addComposedFilesItem(CallsRecordingFile composedFilesItem) { if (this.composedFiles == null) { this.composedFiles = new ArrayList<>(); } @@ -209,9 +209,9 @@ public void setComposedFiles(List composedFiles) { * Sets callRecordings. * * @param callRecordings - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording callRecordings(List callRecordings) { + public CallsDialogRecordingResponse callRecordings(List callRecordings) { this.callRecordings = callRecordings; return this; } @@ -220,9 +220,9 @@ public CallsDialogRecording callRecordings(List callRecordings) { * Adds and item into callRecordings. * * @param callRecordingsItem The item to be added to the list. - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording addCallRecordingsItem(CallRecording callRecordingsItem) { + public CallsDialogRecordingResponse addCallRecordingsItem(CallRecording callRecordingsItem) { if (this.callRecordings == null) { this.callRecordings = new ArrayList<>(); } @@ -254,9 +254,9 @@ public void setCallRecordings(List callRecordings) { * Sets startTime. * * @param startTime - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording startTime(OffsetDateTime startTime) { + public CallsDialogRecordingResponse startTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -285,9 +285,9 @@ public void setStartTime(OffsetDateTime startTime) { * Sets endTime. * * @param endTime - * @return This {@link CallsDialogRecording instance}. + * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecording endTime(OffsetDateTime endTime) { + public CallsDialogRecordingResponse endTime(OffsetDateTime endTime) { this.endTime = endTime; return this; } @@ -320,15 +320,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CallsDialogRecording callsDialogRecording = (CallsDialogRecording) o; - return Objects.equals(this.dialogId, callsDialogRecording.dialogId) - && Objects.equals(this.callsConfigurationId, callsDialogRecording.callsConfigurationId) - && Objects.equals(this.applicationId, callsDialogRecording.applicationId) - && Objects.equals(this.entityId, callsDialogRecording.entityId) - && Objects.equals(this.composedFiles, callsDialogRecording.composedFiles) - && Objects.equals(this.callRecordings, callsDialogRecording.callRecordings) - && Objects.equals(this.startTime, callsDialogRecording.startTime) - && Objects.equals(this.endTime, callsDialogRecording.endTime); + CallsDialogRecordingResponse callsDialogRecordingResponse = (CallsDialogRecordingResponse) o; + return Objects.equals(this.dialogId, callsDialogRecordingResponse.dialogId) + && Objects.equals(this.callsConfigurationId, callsDialogRecordingResponse.callsConfigurationId) + && Objects.equals(this.applicationId, callsDialogRecordingResponse.applicationId) + && Objects.equals(this.entityId, callsDialogRecordingResponse.entityId) + && Objects.equals(this.composedFiles, callsDialogRecordingResponse.composedFiles) + && Objects.equals(this.callRecordings, callsDialogRecordingResponse.callRecordings) + && Objects.equals(this.startTime, callsDialogRecordingResponse.startTime) + && Objects.equals(this.endTime, callsDialogRecordingResponse.endTime); } @Override @@ -348,7 +348,7 @@ public int hashCode() { public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class CallsDialogRecording {") + .append("class CallsDialogRecordingResponse {") .append(newLine) .append(" dialogId: ") .append(toIndentedString(dialogId)) diff --git a/src/main/java/com/infobip/model/RcsInboundEvents.java b/src/main/java/com/infobip/model/RcsInboundEvents.java index 73b7696..75b719e 100644 --- a/src/main/java/com/infobip/model/RcsInboundEvents.java +++ b/src/main/java/com/infobip/model/RcsInboundEvents.java @@ -19,7 +19,7 @@ */ public class RcsInboundEvents { - private List results = new ArrayList<>(); + private List results = new ArrayList<>(); private Integer messageCount; @@ -36,7 +36,7 @@ public class RcsInboundEvents { * @param results * @return This {@link RcsInboundEvents instance}. */ - public RcsInboundEvents results(List results) { + public RcsInboundEvents results(List results) { this.results = results; return this; } @@ -52,7 +52,7 @@ public RcsInboundEvents results(List resul * @param resultsItem The item to be added to the list. * @return This {@link RcsInboundEvents instance}. */ - public RcsInboundEvents addResultsItem(InboundMessageRcsInboundEventContent resultsItem) { + public RcsInboundEvents addResultsItem(RcsInboundMessageEventContent resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -71,7 +71,7 @@ public RcsInboundEvents addResultsItem(InboundMessageRcsInboundEventContent resu * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -86,7 +86,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } diff --git a/src/main/java/com/infobip/model/InboundMessageRcsInboundEventContent.java b/src/main/java/com/infobip/model/RcsInboundMessageEventContent.java similarity index 80% rename from src/main/java/com/infobip/model/InboundMessageRcsInboundEventContent.java rename to src/main/java/com/infobip/model/RcsInboundMessageEventContent.java index 187f533..09123c4 100644 --- a/src/main/java/com/infobip/model/InboundMessageRcsInboundEventContent.java +++ b/src/main/java/com/infobip/model/RcsInboundMessageEventContent.java @@ -16,7 +16,7 @@ /** * Collection of mobile originated events. */ -public class InboundMessageRcsInboundEventContent { +public class RcsInboundMessageEventContent { private String campaignReferenceId; @@ -53,9 +53,9 @@ public class InboundMessageRcsInboundEventContent { * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * * @param campaignReferenceId - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent campaignReferenceId(String campaignReferenceId) { + public RcsInboundMessageEventContent campaignReferenceId(String campaignReferenceId) { this.campaignReferenceId = campaignReferenceId; return this; } @@ -95,9 +95,9 @@ public void setCampaignReferenceId(String campaignReferenceId) { * The field is required. * * @param sender - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent sender(String sender) { + public RcsInboundMessageEventContent sender(String sender) { this.sender = sender; return this; } @@ -141,9 +141,9 @@ public void setSender(String sender) { * The field is required. * * @param to - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent to(String to) { + public RcsInboundMessageEventContent to(String to) { this.to = to; return this; } @@ -187,9 +187,9 @@ public void setTo(String to) { * The field is required. * * @param integrationType - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent integrationType(String integrationType) { + public RcsInboundMessageEventContent integrationType(String integrationType) { this.integrationType = integrationType; return this; } @@ -233,9 +233,9 @@ public void setIntegrationType(String integrationType) { * The field is required. * * @param receivedAt - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent receivedAt(OffsetDateTime receivedAt) { + public RcsInboundMessageEventContent receivedAt(OffsetDateTime receivedAt) { this.receivedAt = receivedAt; return this; } @@ -276,9 +276,9 @@ public void setReceivedAt(OffsetDateTime receivedAt) { * The field is required. * * @param interactionType - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent interactionType(RcsEventInteractionType interactionType) { + public RcsInboundMessageEventContent interactionType(RcsEventInteractionType interactionType) { this.interactionType = interactionType; return this; } @@ -314,9 +314,9 @@ public void setInteractionType(RcsEventInteractionType interactionType) { * Keyword extracted from the message text. * * @param keyword - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent keyword(String keyword) { + public RcsInboundMessageEventContent keyword(String keyword) { this.keyword = keyword; return this; } @@ -356,9 +356,9 @@ public void setKeyword(String keyword) { * The field is required. * * @param messageId - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent messageId(String messageId) { + public RcsInboundMessageEventContent messageId(String messageId) { this.messageId = messageId; return this; } @@ -400,9 +400,9 @@ public void setMessageId(String messageId) { * Message ID of paired outgoing message if matched by Infobip platform. * * @param pairedMessageId - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent pairedMessageId(String pairedMessageId) { + public RcsInboundMessageEventContent pairedMessageId(String pairedMessageId) { this.pairedMessageId = pairedMessageId; return this; } @@ -440,9 +440,9 @@ public void setPairedMessageId(String pairedMessageId) { * Callback data sent through ‛callbackData‛ field when sending message. * * @param callbackData - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent callbackData(String callbackData) { + public RcsInboundMessageEventContent callbackData(String callbackData) { this.callbackData = callbackData; return this; } @@ -479,9 +479,9 @@ public void setCallbackData(String callbackData) { * The field is required. * * @param message - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent message(RcsInboundMessageContent message) { + public RcsInboundMessageEventContent message(RcsInboundMessageContent message) { this.message = message; return this; } @@ -516,9 +516,9 @@ public void setMessage(RcsInboundMessageContent message) { * The field is required. * * @param price - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent price(RcsMessagePrice price) { + public RcsInboundMessageEventContent price(RcsMessagePrice price) { this.price = price; return this; } @@ -553,9 +553,9 @@ public void setPrice(RcsMessagePrice price) { * The field is required. * * @param conversation - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent conversation(RcsConversationInfo conversation) { + public RcsInboundMessageEventContent conversation(RcsConversationInfo conversation) { this.conversation = conversation; return this; } @@ -590,9 +590,9 @@ public void setConversation(RcsConversationInfo conversation) { * The field is required. * * @param platform - * @return This {@link InboundMessageRcsInboundEventContent instance}. + * @return This {@link RcsInboundMessageEventContent instance}. */ - public InboundMessageRcsInboundEventContent platform(Platform platform) { + public RcsInboundMessageEventContent platform(Platform platform) { this.platform = platform; return this; } @@ -629,22 +629,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - InboundMessageRcsInboundEventContent inboundMessageRcsInboundEventContent = - (InboundMessageRcsInboundEventContent) o; - return Objects.equals(this.campaignReferenceId, inboundMessageRcsInboundEventContent.campaignReferenceId) - && Objects.equals(this.sender, inboundMessageRcsInboundEventContent.sender) - && Objects.equals(this.to, inboundMessageRcsInboundEventContent.to) - && Objects.equals(this.integrationType, inboundMessageRcsInboundEventContent.integrationType) - && Objects.equals(this.receivedAt, inboundMessageRcsInboundEventContent.receivedAt) - && Objects.equals(this.interactionType, inboundMessageRcsInboundEventContent.interactionType) - && Objects.equals(this.keyword, inboundMessageRcsInboundEventContent.keyword) - && Objects.equals(this.messageId, inboundMessageRcsInboundEventContent.messageId) - && Objects.equals(this.pairedMessageId, inboundMessageRcsInboundEventContent.pairedMessageId) - && Objects.equals(this.callbackData, inboundMessageRcsInboundEventContent.callbackData) - && Objects.equals(this.message, inboundMessageRcsInboundEventContent.message) - && Objects.equals(this.price, inboundMessageRcsInboundEventContent.price) - && Objects.equals(this.conversation, inboundMessageRcsInboundEventContent.conversation) - && Objects.equals(this.platform, inboundMessageRcsInboundEventContent.platform); + RcsInboundMessageEventContent rcsInboundMessageEventContent = (RcsInboundMessageEventContent) o; + return Objects.equals(this.campaignReferenceId, rcsInboundMessageEventContent.campaignReferenceId) + && Objects.equals(this.sender, rcsInboundMessageEventContent.sender) + && Objects.equals(this.to, rcsInboundMessageEventContent.to) + && Objects.equals(this.integrationType, rcsInboundMessageEventContent.integrationType) + && Objects.equals(this.receivedAt, rcsInboundMessageEventContent.receivedAt) + && Objects.equals(this.interactionType, rcsInboundMessageEventContent.interactionType) + && Objects.equals(this.keyword, rcsInboundMessageEventContent.keyword) + && Objects.equals(this.messageId, rcsInboundMessageEventContent.messageId) + && Objects.equals(this.pairedMessageId, rcsInboundMessageEventContent.pairedMessageId) + && Objects.equals(this.callbackData, rcsInboundMessageEventContent.callbackData) + && Objects.equals(this.message, rcsInboundMessageEventContent.message) + && Objects.equals(this.price, rcsInboundMessageEventContent.price) + && Objects.equals(this.conversation, rcsInboundMessageEventContent.conversation) + && Objects.equals(this.platform, rcsInboundMessageEventContent.platform); } @Override @@ -670,7 +669,7 @@ public int hashCode() { public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class InboundMessageRcsInboundEventContent {") + .append("class RcsInboundMessageEventContent {") .append(newLine) .append(" campaignReferenceId: ") .append(toIndentedString(campaignReferenceId)) diff --git a/src/main/java/com/infobip/model/InboundMessageRcsInboundMessageContent.java b/src/main/java/com/infobip/model/RcsInboundMessageRcsInboundMessageContent.java similarity index 79% rename from src/main/java/com/infobip/model/InboundMessageRcsInboundMessageContent.java rename to src/main/java/com/infobip/model/RcsInboundMessageRcsInboundMessageContent.java index 110ea49..9691642 100644 --- a/src/main/java/com/infobip/model/InboundMessageRcsInboundMessageContent.java +++ b/src/main/java/com/infobip/model/RcsInboundMessageRcsInboundMessageContent.java @@ -16,7 +16,7 @@ /** * Collection of mobile originated messages. */ -public class InboundMessageRcsInboundMessageContent { +public class RcsInboundMessageRcsInboundMessageContent { private String campaignReferenceId; @@ -55,9 +55,9 @@ public class InboundMessageRcsInboundMessageContent { * ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel. * * @param campaignReferenceId - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent campaignReferenceId(String campaignReferenceId) { + public RcsInboundMessageRcsInboundMessageContent campaignReferenceId(String campaignReferenceId) { this.campaignReferenceId = campaignReferenceId; return this; } @@ -97,9 +97,9 @@ public void setCampaignReferenceId(String campaignReferenceId) { * The field is required. * * @param sender - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent sender(String sender) { + public RcsInboundMessageRcsInboundMessageContent sender(String sender) { this.sender = sender; return this; } @@ -143,9 +143,9 @@ public void setSender(String sender) { * The field is required. * * @param to - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent to(String to) { + public RcsInboundMessageRcsInboundMessageContent to(String to) { this.to = to; return this; } @@ -189,9 +189,9 @@ public void setTo(String to) { * The field is required. * * @param integrationType - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent integrationType(String integrationType) { + public RcsInboundMessageRcsInboundMessageContent integrationType(String integrationType) { this.integrationType = integrationType; return this; } @@ -235,9 +235,9 @@ public void setIntegrationType(String integrationType) { * The field is required. * * @param receivedAt - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent receivedAt(OffsetDateTime receivedAt) { + public RcsInboundMessageRcsInboundMessageContent receivedAt(OffsetDateTime receivedAt) { this.receivedAt = receivedAt; return this; } @@ -278,9 +278,9 @@ public void setReceivedAt(OffsetDateTime receivedAt) { * The field is required. * * @param interactionType - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent interactionType(RcsMessageInteractionType interactionType) { + public RcsInboundMessageRcsInboundMessageContent interactionType(RcsMessageInteractionType interactionType) { this.interactionType = interactionType; return this; } @@ -318,9 +318,9 @@ public void setInteractionType(RcsMessageInteractionType interactionType) { * The field is required. * * @param rcsCount - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent rcsCount(Integer rcsCount) { + public RcsInboundMessageRcsInboundMessageContent rcsCount(Integer rcsCount) { this.rcsCount = rcsCount; return this; } @@ -362,9 +362,9 @@ public void setRcsCount(Integer rcsCount) { * Keyword extracted from the message text. * * @param keyword - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent keyword(String keyword) { + public RcsInboundMessageRcsInboundMessageContent keyword(String keyword) { this.keyword = keyword; return this; } @@ -404,9 +404,9 @@ public void setKeyword(String keyword) { * The field is required. * * @param messageId - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent messageId(String messageId) { + public RcsInboundMessageRcsInboundMessageContent messageId(String messageId) { this.messageId = messageId; return this; } @@ -448,9 +448,9 @@ public void setMessageId(String messageId) { * Message ID of paired outgoing message if matched by Infobip platform. * * @param pairedMessageId - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent pairedMessageId(String pairedMessageId) { + public RcsInboundMessageRcsInboundMessageContent pairedMessageId(String pairedMessageId) { this.pairedMessageId = pairedMessageId; return this; } @@ -488,9 +488,9 @@ public void setPairedMessageId(String pairedMessageId) { * Callback data sent through ‛callbackData‛ field when sending message. * * @param callbackData - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent callbackData(String callbackData) { + public RcsInboundMessageRcsInboundMessageContent callbackData(String callbackData) { this.callbackData = callbackData; return this; } @@ -527,9 +527,9 @@ public void setCallbackData(String callbackData) { * The field is required. * * @param message - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent message(RcsInboundMessageContent message) { + public RcsInboundMessageRcsInboundMessageContent message(RcsInboundMessageContent message) { this.message = message; return this; } @@ -564,9 +564,9 @@ public void setMessage(RcsInboundMessageContent message) { * The field is required. * * @param price - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent price(RcsMessagePrice price) { + public RcsInboundMessageRcsInboundMessageContent price(RcsMessagePrice price) { this.price = price; return this; } @@ -601,9 +601,9 @@ public void setPrice(RcsMessagePrice price) { * The field is required. * * @param conversation - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent conversation(RcsConversationInfo conversation) { + public RcsInboundMessageRcsInboundMessageContent conversation(RcsConversationInfo conversation) { this.conversation = conversation; return this; } @@ -638,9 +638,9 @@ public void setConversation(RcsConversationInfo conversation) { * The field is required. * * @param platform - * @return This {@link InboundMessageRcsInboundMessageContent instance}. + * @return This {@link RcsInboundMessageRcsInboundMessageContent instance}. */ - public InboundMessageRcsInboundMessageContent platform(Platform platform) { + public RcsInboundMessageRcsInboundMessageContent platform(Platform platform) { this.platform = platform; return this; } @@ -677,23 +677,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - InboundMessageRcsInboundMessageContent inboundMessageRcsInboundMessageContent = - (InboundMessageRcsInboundMessageContent) o; - return Objects.equals(this.campaignReferenceId, inboundMessageRcsInboundMessageContent.campaignReferenceId) - && Objects.equals(this.sender, inboundMessageRcsInboundMessageContent.sender) - && Objects.equals(this.to, inboundMessageRcsInboundMessageContent.to) - && Objects.equals(this.integrationType, inboundMessageRcsInboundMessageContent.integrationType) - && Objects.equals(this.receivedAt, inboundMessageRcsInboundMessageContent.receivedAt) - && Objects.equals(this.interactionType, inboundMessageRcsInboundMessageContent.interactionType) - && Objects.equals(this.rcsCount, inboundMessageRcsInboundMessageContent.rcsCount) - && Objects.equals(this.keyword, inboundMessageRcsInboundMessageContent.keyword) - && Objects.equals(this.messageId, inboundMessageRcsInboundMessageContent.messageId) - && Objects.equals(this.pairedMessageId, inboundMessageRcsInboundMessageContent.pairedMessageId) - && Objects.equals(this.callbackData, inboundMessageRcsInboundMessageContent.callbackData) - && Objects.equals(this.message, inboundMessageRcsInboundMessageContent.message) - && Objects.equals(this.price, inboundMessageRcsInboundMessageContent.price) - && Objects.equals(this.conversation, inboundMessageRcsInboundMessageContent.conversation) - && Objects.equals(this.platform, inboundMessageRcsInboundMessageContent.platform); + RcsInboundMessageRcsInboundMessageContent rcsInboundMessageRcsInboundMessageContent = + (RcsInboundMessageRcsInboundMessageContent) o; + return Objects.equals(this.campaignReferenceId, rcsInboundMessageRcsInboundMessageContent.campaignReferenceId) + && Objects.equals(this.sender, rcsInboundMessageRcsInboundMessageContent.sender) + && Objects.equals(this.to, rcsInboundMessageRcsInboundMessageContent.to) + && Objects.equals(this.integrationType, rcsInboundMessageRcsInboundMessageContent.integrationType) + && Objects.equals(this.receivedAt, rcsInboundMessageRcsInboundMessageContent.receivedAt) + && Objects.equals(this.interactionType, rcsInboundMessageRcsInboundMessageContent.interactionType) + && Objects.equals(this.rcsCount, rcsInboundMessageRcsInboundMessageContent.rcsCount) + && Objects.equals(this.keyword, rcsInboundMessageRcsInboundMessageContent.keyword) + && Objects.equals(this.messageId, rcsInboundMessageRcsInboundMessageContent.messageId) + && Objects.equals(this.pairedMessageId, rcsInboundMessageRcsInboundMessageContent.pairedMessageId) + && Objects.equals(this.callbackData, rcsInboundMessageRcsInboundMessageContent.callbackData) + && Objects.equals(this.message, rcsInboundMessageRcsInboundMessageContent.message) + && Objects.equals(this.price, rcsInboundMessageRcsInboundMessageContent.price) + && Objects.equals(this.conversation, rcsInboundMessageRcsInboundMessageContent.conversation) + && Objects.equals(this.platform, rcsInboundMessageRcsInboundMessageContent.platform); } @Override @@ -720,7 +720,7 @@ public int hashCode() { public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class InboundMessageRcsInboundMessageContent {") + .append("class RcsInboundMessageRcsInboundMessageContent {") .append(newLine) .append(" campaignReferenceId: ") .append(toIndentedString(campaignReferenceId)) diff --git a/src/main/java/com/infobip/model/RcsInboundMessages.java b/src/main/java/com/infobip/model/RcsInboundMessages.java index b87ba82..75c88e5 100644 --- a/src/main/java/com/infobip/model/RcsInboundMessages.java +++ b/src/main/java/com/infobip/model/RcsInboundMessages.java @@ -19,7 +19,7 @@ */ public class RcsInboundMessages { - private List results = new ArrayList<>(); + private List results = new ArrayList<>(); private Integer messageCount; @@ -36,7 +36,7 @@ public class RcsInboundMessages { * @param results * @return This {@link RcsInboundMessages instance}. */ - public RcsInboundMessages results(List results) { + public RcsInboundMessages results(List results) { this.results = results; return this; } @@ -52,7 +52,7 @@ public RcsInboundMessages results(List r * @param resultsItem The item to be added to the list. * @return This {@link RcsInboundMessages instance}. */ - public RcsInboundMessages addResultsItem(InboundMessageRcsInboundMessageContent resultsItem) { + public RcsInboundMessages addResultsItem(RcsInboundMessageRcsInboundMessageContent resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -71,7 +71,7 @@ public RcsInboundMessages addResultsItem(InboundMessageRcsInboundMessageContent * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -86,7 +86,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } From 7602d1046287d3bfda5184fe0ea2babc4be9fea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Mon, 30 Mar 2026 18:15:53 +0200 Subject: [PATCH 6/9] Updated email.md --- email.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/email.md b/email.md index 44730ec..cadc94a 100644 --- a/email.md +++ b/email.md @@ -25,7 +25,7 @@ Fields `from`, `to`, and `subject` are required. The message must also contain a Keep in mind the following restrictions while using a trial account: - you can only send messages to verified email addresses, -- you can only use your email address with the Infobip test domain in the following form: `YourUserName@selfserviceib.com` +- you can only use your email address with the Infobip test domain in the following form: `YourUserName@selfserve.worlds-connected.co` --- From 25cc32732ba190efd000d430dd62ccee38a3eb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Tue, 31 Mar 2026 15:23:03 +0200 Subject: [PATCH 7/9] Brought back CallsDialogRecording. --- src/main/java/com/infobip/api/CallsApi.java | 22 +- ...lsDialogCompositionFinishedProperties.java | 8 +- ...cording.java => CallsDialogRecording.java} | 208 ++++++++---------- .../model/CallsDialogRecordingPage.java | 10 +- .../CallsDialogRecordingReadyProperties.java | 8 +- .../model/CallsDialogRecordingResponse.java | 162 ++++++++------ 6 files changed, 209 insertions(+), 209 deletions(-) rename src/main/java/com/infobip/model/{CallsPublicDialogRecording.java => CallsDialogRecording.java} (56%) diff --git a/src/main/java/com/infobip/api/CallsApi.java b/src/main/java/com/infobip/api/CallsApi.java index 58c462a..357c001 100644 --- a/src/main/java/com/infobip/api/CallsApi.java +++ b/src/main/java/com/infobip/api/CallsApi.java @@ -56,6 +56,7 @@ import com.infobip.model.CallsDialogPlayRequest; import com.infobip.model.CallsDialogRecordingPage; import com.infobip.model.CallsDialogRecordingRequest; +import com.infobip.model.CallsDialogRecordingResponse; import com.infobip.model.CallsDialogRequest; import com.infobip.model.CallsDialogResponse; import com.infobip.model.CallsDialogSayRequest; @@ -75,7 +76,6 @@ import com.infobip.model.CallsPreAnswerRequest; import com.infobip.model.CallsPublicConferenceRecording; import com.infobip.model.CallsPublicCountry; -import com.infobip.model.CallsPublicDialogRecording; import com.infobip.model.CallsPublicRecording; import com.infobip.model.CallsPublicRecordingFile; import com.infobip.model.CallsPublicRegion; @@ -2828,13 +2828,13 @@ public DeleteDialogRecordingsRequest location(CallsRecordingLocation location) { /** * Executes the deleteDialogRecordings request. * - * @return CallsPublicDialogRecording The deserialized response. + * @return CallsDialogRecordingResponse The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsPublicDialogRecording execute() throws ApiException { + public CallsDialogRecordingResponse execute() throws ApiException { RequestDefinition deleteDialogRecordingsDefinition = deleteDialogRecordingsDefinition(dialogId, location); return apiClient.execute( - deleteDialogRecordingsDefinition, new TypeReference() {}.getType()); + deleteDialogRecordingsDefinition, new TypeReference() {}.getType()); } /** @@ -2843,11 +2843,11 @@ public CallsPublicDialogRecording execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition deleteDialogRecordingsDefinition = deleteDialogRecordingsDefinition(dialogId, location); return apiClient.executeAsync( deleteDialogRecordingsDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } @@ -6015,13 +6015,13 @@ public GetDialogRecordingsRequest location(CallsRecordingLocation location) { /** * Executes the getDialogRecordings request. * - * @return CallsPublicDialogRecording The deserialized response. + * @return CallsDialogRecordingResponse The deserialized response. * @throws ApiException If the API call fails or an error occurs during the request or response processing. */ - public CallsPublicDialogRecording execute() throws ApiException { + public CallsDialogRecordingResponse execute() throws ApiException { RequestDefinition getDialogRecordingsDefinition = getDialogRecordingsDefinition(dialogId, location); return apiClient.execute( - getDialogRecordingsDefinition, new TypeReference() {}.getType()); + getDialogRecordingsDefinition, new TypeReference() {}.getType()); } /** @@ -6030,11 +6030,11 @@ public CallsPublicDialogRecording execute() throws ApiException { * @param callback The {@link ApiCallback} to be invoked. * @return The {@link okhttp3.Call} associated with the API request. */ - public okhttp3.Call executeAsync(ApiCallback callback) { + public okhttp3.Call executeAsync(ApiCallback callback) { RequestDefinition getDialogRecordingsDefinition = getDialogRecordingsDefinition(dialogId, location); return apiClient.executeAsync( getDialogRecordingsDefinition, - new TypeReference() {}.getType(), + new TypeReference() {}.getType(), callback); } } diff --git a/src/main/java/com/infobip/model/CallsDialogCompositionFinishedProperties.java b/src/main/java/com/infobip/model/CallsDialogCompositionFinishedProperties.java index 6f179a8..2db4dcb 100644 --- a/src/main/java/com/infobip/model/CallsDialogCompositionFinishedProperties.java +++ b/src/main/java/com/infobip/model/CallsDialogCompositionFinishedProperties.java @@ -17,7 +17,7 @@ */ public class CallsDialogCompositionFinishedProperties { - private CallsDialogRecordingResponse recording; + private CallsDialogRecording recording; /** * Sets recording. @@ -25,7 +25,7 @@ public class CallsDialogCompositionFinishedProperties { * @param recording * @return This {@link CallsDialogCompositionFinishedProperties instance}. */ - public CallsDialogCompositionFinishedProperties recording(CallsDialogRecordingResponse recording) { + public CallsDialogCompositionFinishedProperties recording(CallsDialogRecording recording) { this.recording = recording; return this; } @@ -36,7 +36,7 @@ public CallsDialogCompositionFinishedProperties recording(CallsDialogRecordingRe * @return recording */ @JsonProperty("recording") - public CallsDialogRecordingResponse getRecording() { + public CallsDialogRecording getRecording() { return recording; } @@ -46,7 +46,7 @@ public CallsDialogRecordingResponse getRecording() { * @param recording */ @JsonProperty("recording") - public void setRecording(CallsDialogRecordingResponse recording) { + public void setRecording(CallsDialogRecording recording) { this.recording = recording; } diff --git a/src/main/java/com/infobip/model/CallsPublicDialogRecording.java b/src/main/java/com/infobip/model/CallsDialogRecording.java similarity index 56% rename from src/main/java/com/infobip/model/CallsPublicDialogRecording.java rename to src/main/java/com/infobip/model/CallsDialogRecording.java index d7a81f0..e691e6f 100644 --- a/src/main/java/com/infobip/model/CallsPublicDialogRecording.java +++ b/src/main/java/com/infobip/model/CallsDialogRecording.java @@ -16,19 +16,21 @@ import java.util.Objects; /** - * Represents CallsPublicDialogRecording model. + * Represents CallsDialogRecording model. */ -public class CallsPublicDialogRecording { +public class CallsDialogRecording { private String dialogId; private String callsConfigurationId; - private Platform platform; + private String applicationId; - private List composedFiles = null; + private String entityId; - private List callRecordings = null; + private List composedFiles = null; + + private List callRecordings = null; private OffsetDateTime startTime; @@ -36,23 +38,17 @@ public class CallsPublicDialogRecording { /** * Sets dialogId. - *

- * Field description: - * Unique dialog ID. * * @param dialogId - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecording instance}. */ - public CallsPublicDialogRecording dialogId(String dialogId) { + public CallsDialogRecording dialogId(String dialogId) { this.dialogId = dialogId; return this; } /** * Returns dialogId. - *

- * Field description: - * Unique dialog ID. * * @return dialogId */ @@ -63,9 +59,6 @@ public String getDialogId() { /** * Sets dialogId. - *

- * Field description: - * Unique dialog ID. * * @param dialogId */ @@ -76,23 +69,17 @@ public void setDialogId(String dialogId) { /** * Sets callsConfigurationId. - *

- * Field description: - * Calls Configuration ID. * * @param callsConfigurationId - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecording instance}. */ - public CallsPublicDialogRecording callsConfigurationId(String callsConfigurationId) { + public CallsDialogRecording callsConfigurationId(String callsConfigurationId) { this.callsConfigurationId = callsConfigurationId; return this; } /** * Returns callsConfigurationId. - *

- * Field description: - * Calls Configuration ID. * * @return callsConfigurationId */ @@ -103,9 +90,6 @@ public String getCallsConfigurationId() { /** * Sets callsConfigurationId. - *

- * Field description: - * Calls Configuration ID. * * @param callsConfigurationId */ @@ -115,60 +99,85 @@ public void setCallsConfigurationId(String callsConfigurationId) { } /** - * Sets platform. + * Sets applicationId. + * + * @param applicationId + * @return This {@link CallsDialogRecording instance}. + */ + public CallsDialogRecording applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Returns applicationId. + * + * @return applicationId + */ + @JsonProperty("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Sets applicationId. * - * @param platform - * @return This {@link CallsPublicDialogRecording instance}. + * @param applicationId */ - public CallsPublicDialogRecording platform(Platform platform) { - this.platform = platform; + @JsonProperty("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Sets entityId. + * + * @param entityId + * @return This {@link CallsDialogRecording instance}. + */ + public CallsDialogRecording entityId(String entityId) { + this.entityId = entityId; return this; } /** - * Returns platform. + * Returns entityId. * - * @return platform + * @return entityId */ - @JsonProperty("platform") - public Platform getPlatform() { - return platform; + @JsonProperty("entityId") + public String getEntityId() { + return entityId; } /** - * Sets platform. + * Sets entityId. * - * @param platform + * @param entityId */ - @JsonProperty("platform") - public void setPlatform(Platform platform) { - this.platform = platform; + @JsonProperty("entityId") + public void setEntityId(String entityId) { + this.entityId = entityId; } /** * Sets composedFiles. - *

- * Field description: - * File(s) with a recording of both dialog participants. * * @param composedFiles - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecording instance}. */ - public CallsPublicDialogRecording composedFiles(List composedFiles) { + public CallsDialogRecording composedFiles(List composedFiles) { this.composedFiles = composedFiles; return this; } /** * Adds and item into composedFiles. - *

- * Field description: - * File(s) with a recording of both dialog participants. * * @param composedFilesItem The item to be added to the list. - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecording instance}. */ - public CallsPublicDialogRecording addComposedFilesItem(CallsPublicRecordingFile composedFilesItem) { + public CallsDialogRecording addComposedFilesItem(CallsRecordingFile composedFilesItem) { if (this.composedFiles == null) { this.composedFiles = new ArrayList<>(); } @@ -178,54 +187,42 @@ public CallsPublicDialogRecording addComposedFilesItem(CallsPublicRecordingFile /** * Returns composedFiles. - *

- * Field description: - * File(s) with a recording of both dialog participants. * * @return composedFiles */ @JsonProperty("composedFiles") - public List getComposedFiles() { + public List getComposedFiles() { return composedFiles; } /** * Sets composedFiles. - *

- * Field description: - * File(s) with a recording of both dialog participants. * * @param composedFiles */ @JsonProperty("composedFiles") - public void setComposedFiles(List composedFiles) { + public void setComposedFiles(List composedFiles) { this.composedFiles = composedFiles; } /** * Sets callRecordings. - *

- * Field description: - * File(s) with a recording of one dialog participant. * * @param callRecordings - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecording instance}. */ - public CallsPublicDialogRecording callRecordings(List callRecordings) { + public CallsDialogRecording callRecordings(List callRecordings) { this.callRecordings = callRecordings; return this; } /** * Adds and item into callRecordings. - *

- * Field description: - * File(s) with a recording of one dialog participant. * * @param callRecordingsItem The item to be added to the list. - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecording instance}. */ - public CallsPublicDialogRecording addCallRecordingsItem(CallsPublicRecording callRecordingsItem) { + public CallsDialogRecording addCallRecordingsItem(CallRecording callRecordingsItem) { if (this.callRecordings == null) { this.callRecordings = new ArrayList<>(); } @@ -235,49 +232,37 @@ public CallsPublicDialogRecording addCallRecordingsItem(CallsPublicRecording cal /** * Returns callRecordings. - *

- * Field description: - * File(s) with a recording of one dialog participant. * * @return callRecordings */ @JsonProperty("callRecordings") - public List getCallRecordings() { + public List getCallRecordings() { return callRecordings; } /** * Sets callRecordings. - *

- * Field description: - * File(s) with a recording of one dialog participant. * * @param callRecordings */ @JsonProperty("callRecordings") - public void setCallRecordings(List callRecordings) { + public void setCallRecordings(List callRecordings) { this.callRecordings = callRecordings; } /** * Sets startTime. - *

- * Field description: - * Date and time when the (first) recording started. * * @param startTime - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecording instance}. */ - public CallsPublicDialogRecording startTime(OffsetDateTime startTime) { + public CallsDialogRecording startTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } /** * Returns startTime. - *

- * Field description: - * Date and time when the (first) recording started. * * @return startTime */ @@ -288,9 +273,6 @@ public OffsetDateTime getStartTime() { /** * Sets startTime. - *

- * Field description: - * Date and time when the (first) recording started. * * @param startTime */ @@ -301,23 +283,17 @@ public void setStartTime(OffsetDateTime startTime) { /** * Sets endTime. - *

- * Field description: - * Date and time when the (last) recording ended. * * @param endTime - * @return This {@link CallsPublicDialogRecording instance}. + * @return This {@link CallsDialogRecording instance}. */ - public CallsPublicDialogRecording endTime(OffsetDateTime endTime) { + public CallsDialogRecording endTime(OffsetDateTime endTime) { this.endTime = endTime; return this; } /** * Returns endTime. - *

- * Field description: - * Date and time when the (last) recording ended. * * @return endTime */ @@ -328,9 +304,6 @@ public OffsetDateTime getEndTime() { /** * Sets endTime. - *

- * Field description: - * Date and time when the (last) recording ended. * * @param endTime */ @@ -347,27 +320,35 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CallsPublicDialogRecording callsPublicDialogRecording = (CallsPublicDialogRecording) o; - return Objects.equals(this.dialogId, callsPublicDialogRecording.dialogId) - && Objects.equals(this.callsConfigurationId, callsPublicDialogRecording.callsConfigurationId) - && Objects.equals(this.platform, callsPublicDialogRecording.platform) - && Objects.equals(this.composedFiles, callsPublicDialogRecording.composedFiles) - && Objects.equals(this.callRecordings, callsPublicDialogRecording.callRecordings) - && Objects.equals(this.startTime, callsPublicDialogRecording.startTime) - && Objects.equals(this.endTime, callsPublicDialogRecording.endTime); + CallsDialogRecording callsDialogRecording = (CallsDialogRecording) o; + return Objects.equals(this.dialogId, callsDialogRecording.dialogId) + && Objects.equals(this.callsConfigurationId, callsDialogRecording.callsConfigurationId) + && Objects.equals(this.applicationId, callsDialogRecording.applicationId) + && Objects.equals(this.entityId, callsDialogRecording.entityId) + && Objects.equals(this.composedFiles, callsDialogRecording.composedFiles) + && Objects.equals(this.callRecordings, callsDialogRecording.callRecordings) + && Objects.equals(this.startTime, callsDialogRecording.startTime) + && Objects.equals(this.endTime, callsDialogRecording.endTime); } @Override public int hashCode() { return Objects.hash( - dialogId, callsConfigurationId, platform, composedFiles, callRecordings, startTime, endTime); + dialogId, + callsConfigurationId, + applicationId, + entityId, + composedFiles, + callRecordings, + startTime, + endTime); } @Override public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() - .append("class CallsPublicDialogRecording {") + .append("class CallsDialogRecording {") .append(newLine) .append(" dialogId: ") .append(toIndentedString(dialogId)) @@ -375,8 +356,11 @@ public String toString() { .append(" callsConfigurationId: ") .append(toIndentedString(callsConfigurationId)) .append(newLine) - .append(" platform: ") - .append(toIndentedString(platform)) + .append(" applicationId: ") + .append(toIndentedString(applicationId)) + .append(newLine) + .append(" entityId: ") + .append(toIndentedString(entityId)) .append(newLine) .append(" composedFiles: ") .append(toIndentedString(composedFiles)) diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingPage.java b/src/main/java/com/infobip/model/CallsDialogRecordingPage.java index 9ccb8ef..8383227 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecordingPage.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingPage.java @@ -19,7 +19,7 @@ */ public class CallsDialogRecordingPage { - private List results = null; + private List results = null; private PageInfo paging; @@ -32,7 +32,7 @@ public class CallsDialogRecordingPage { * @param results * @return This {@link CallsDialogRecordingPage instance}. */ - public CallsDialogRecordingPage results(List results) { + public CallsDialogRecordingPage results(List results) { this.results = results; return this; } @@ -46,7 +46,7 @@ public CallsDialogRecordingPage results(List results * @param resultsItem The item to be added to the list. * @return This {@link CallsDialogRecordingPage instance}. */ - public CallsDialogRecordingPage addResultsItem(CallsPublicDialogRecording resultsItem) { + public CallsDialogRecordingPage addResultsItem(CallsDialogRecordingResponse resultsItem) { if (this.results == null) { this.results = new ArrayList<>(); } @@ -63,7 +63,7 @@ public CallsDialogRecordingPage addResultsItem(CallsPublicDialogRecording result * @return results */ @JsonProperty("results") - public List getResults() { + public List getResults() { return results; } @@ -76,7 +76,7 @@ public List getResults() { * @param results */ @JsonProperty("results") - public void setResults(List results) { + public void setResults(List results) { this.results = results; } diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingReadyProperties.java b/src/main/java/com/infobip/model/CallsDialogRecordingReadyProperties.java index f11aaf1..34544ee 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecordingReadyProperties.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingReadyProperties.java @@ -17,7 +17,7 @@ */ public class CallsDialogRecordingReadyProperties { - private CallsDialogRecordingResponse recording; + private CallsDialogRecording recording; /** * Sets recording. @@ -25,7 +25,7 @@ public class CallsDialogRecordingReadyProperties { * @param recording * @return This {@link CallsDialogRecordingReadyProperties instance}. */ - public CallsDialogRecordingReadyProperties recording(CallsDialogRecordingResponse recording) { + public CallsDialogRecordingReadyProperties recording(CallsDialogRecording recording) { this.recording = recording; return this; } @@ -36,7 +36,7 @@ public CallsDialogRecordingReadyProperties recording(CallsDialogRecordingRespons * @return recording */ @JsonProperty("recording") - public CallsDialogRecordingResponse getRecording() { + public CallsDialogRecording getRecording() { return recording; } @@ -46,7 +46,7 @@ public CallsDialogRecordingResponse getRecording() { * @param recording */ @JsonProperty("recording") - public void setRecording(CallsDialogRecordingResponse recording) { + public void setRecording(CallsDialogRecording recording) { this.recording = recording; } diff --git a/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java b/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java index 6a1b4c0..9ebd5f7 100644 --- a/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java +++ b/src/main/java/com/infobip/model/CallsDialogRecordingResponse.java @@ -24,13 +24,11 @@ public class CallsDialogRecordingResponse { private String callsConfigurationId; - private String applicationId; + private Platform platform; - private String entityId; + private List composedFiles = null; - private List composedFiles = null; - - private List callRecordings = null; + private List callRecordings = null; private OffsetDateTime startTime; @@ -38,6 +36,9 @@ public class CallsDialogRecordingResponse { /** * Sets dialogId. + *

+ * Field description: + * Unique dialog ID. * * @param dialogId * @return This {@link CallsDialogRecordingResponse instance}. @@ -49,6 +50,9 @@ public CallsDialogRecordingResponse dialogId(String dialogId) { /** * Returns dialogId. + *

+ * Field description: + * Unique dialog ID. * * @return dialogId */ @@ -59,6 +63,9 @@ public String getDialogId() { /** * Sets dialogId. + *

+ * Field description: + * Unique dialog ID. * * @param dialogId */ @@ -69,6 +76,9 @@ public void setDialogId(String dialogId) { /** * Sets callsConfigurationId. + *

+ * Field description: + * Calls Configuration ID. * * @param callsConfigurationId * @return This {@link CallsDialogRecordingResponse instance}. @@ -80,6 +90,9 @@ public CallsDialogRecordingResponse callsConfigurationId(String callsConfigurati /** * Returns callsConfigurationId. + *

+ * Field description: + * Calls Configuration ID. * * @return callsConfigurationId */ @@ -90,6 +103,9 @@ public String getCallsConfigurationId() { /** * Sets callsConfigurationId. + *

+ * Field description: + * Calls Configuration ID. * * @param callsConfigurationId */ @@ -99,85 +115,60 @@ public void setCallsConfigurationId(String callsConfigurationId) { } /** - * Sets applicationId. + * Sets platform. * - * @param applicationId + * @param platform * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecordingResponse applicationId(String applicationId) { - this.applicationId = applicationId; + public CallsDialogRecordingResponse platform(Platform platform) { + this.platform = platform; return this; } /** - * Returns applicationId. - * - * @return applicationId - */ - @JsonProperty("applicationId") - public String getApplicationId() { - return applicationId; - } - - /** - * Sets applicationId. + * Returns platform. * - * @param applicationId + * @return platform */ - @JsonProperty("applicationId") - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; + @JsonProperty("platform") + public Platform getPlatform() { + return platform; } /** - * Sets entityId. + * Sets platform. * - * @param entityId - * @return This {@link CallsDialogRecordingResponse instance}. + * @param platform */ - public CallsDialogRecordingResponse entityId(String entityId) { - this.entityId = entityId; - return this; - } - - /** - * Returns entityId. - * - * @return entityId - */ - @JsonProperty("entityId") - public String getEntityId() { - return entityId; - } - - /** - * Sets entityId. - * - * @param entityId - */ - @JsonProperty("entityId") - public void setEntityId(String entityId) { - this.entityId = entityId; + @JsonProperty("platform") + public void setPlatform(Platform platform) { + this.platform = platform; } /** * Sets composedFiles. + *

+ * Field description: + * File(s) with a recording of both dialog participants. * * @param composedFiles * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecordingResponse composedFiles(List composedFiles) { + public CallsDialogRecordingResponse composedFiles(List composedFiles) { this.composedFiles = composedFiles; return this; } /** * Adds and item into composedFiles. + *

+ * Field description: + * File(s) with a recording of both dialog participants. * * @param composedFilesItem The item to be added to the list. * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecordingResponse addComposedFilesItem(CallsRecordingFile composedFilesItem) { + public CallsDialogRecordingResponse addComposedFilesItem(CallsPublicRecordingFile composedFilesItem) { if (this.composedFiles == null) { this.composedFiles = new ArrayList<>(); } @@ -187,42 +178,54 @@ public CallsDialogRecordingResponse addComposedFilesItem(CallsRecordingFile comp /** * Returns composedFiles. + *

+ * Field description: + * File(s) with a recording of both dialog participants. * * @return composedFiles */ @JsonProperty("composedFiles") - public List getComposedFiles() { + public List getComposedFiles() { return composedFiles; } /** * Sets composedFiles. + *

+ * Field description: + * File(s) with a recording of both dialog participants. * * @param composedFiles */ @JsonProperty("composedFiles") - public void setComposedFiles(List composedFiles) { + public void setComposedFiles(List composedFiles) { this.composedFiles = composedFiles; } /** * Sets callRecordings. + *

+ * Field description: + * File(s) with a recording of one dialog participant. * * @param callRecordings * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecordingResponse callRecordings(List callRecordings) { + public CallsDialogRecordingResponse callRecordings(List callRecordings) { this.callRecordings = callRecordings; return this; } /** * Adds and item into callRecordings. + *

+ * Field description: + * File(s) with a recording of one dialog participant. * * @param callRecordingsItem The item to be added to the list. * @return This {@link CallsDialogRecordingResponse instance}. */ - public CallsDialogRecordingResponse addCallRecordingsItem(CallRecording callRecordingsItem) { + public CallsDialogRecordingResponse addCallRecordingsItem(CallsPublicRecording callRecordingsItem) { if (this.callRecordings == null) { this.callRecordings = new ArrayList<>(); } @@ -232,26 +235,35 @@ public CallsDialogRecordingResponse addCallRecordingsItem(CallRecording callReco /** * Returns callRecordings. + *

+ * Field description: + * File(s) with a recording of one dialog participant. * * @return callRecordings */ @JsonProperty("callRecordings") - public List getCallRecordings() { + public List getCallRecordings() { return callRecordings; } /** * Sets callRecordings. + *

+ * Field description: + * File(s) with a recording of one dialog participant. * * @param callRecordings */ @JsonProperty("callRecordings") - public void setCallRecordings(List callRecordings) { + public void setCallRecordings(List callRecordings) { this.callRecordings = callRecordings; } /** * Sets startTime. + *

+ * Field description: + * Date and time when the (first) recording started. * * @param startTime * @return This {@link CallsDialogRecordingResponse instance}. @@ -263,6 +275,9 @@ public CallsDialogRecordingResponse startTime(OffsetDateTime startTime) { /** * Returns startTime. + *

+ * Field description: + * Date and time when the (first) recording started. * * @return startTime */ @@ -273,6 +288,9 @@ public OffsetDateTime getStartTime() { /** * Sets startTime. + *

+ * Field description: + * Date and time when the (first) recording started. * * @param startTime */ @@ -283,6 +301,9 @@ public void setStartTime(OffsetDateTime startTime) { /** * Sets endTime. + *

+ * Field description: + * Date and time when the (last) recording ended. * * @param endTime * @return This {@link CallsDialogRecordingResponse instance}. @@ -294,6 +315,9 @@ public CallsDialogRecordingResponse endTime(OffsetDateTime endTime) { /** * Returns endTime. + *

+ * Field description: + * Date and time when the (last) recording ended. * * @return endTime */ @@ -304,6 +328,9 @@ public OffsetDateTime getEndTime() { /** * Sets endTime. + *

+ * Field description: + * Date and time when the (last) recording ended. * * @param endTime */ @@ -323,8 +350,7 @@ public boolean equals(Object o) { CallsDialogRecordingResponse callsDialogRecordingResponse = (CallsDialogRecordingResponse) o; return Objects.equals(this.dialogId, callsDialogRecordingResponse.dialogId) && Objects.equals(this.callsConfigurationId, callsDialogRecordingResponse.callsConfigurationId) - && Objects.equals(this.applicationId, callsDialogRecordingResponse.applicationId) - && Objects.equals(this.entityId, callsDialogRecordingResponse.entityId) + && Objects.equals(this.platform, callsDialogRecordingResponse.platform) && Objects.equals(this.composedFiles, callsDialogRecordingResponse.composedFiles) && Objects.equals(this.callRecordings, callsDialogRecordingResponse.callRecordings) && Objects.equals(this.startTime, callsDialogRecordingResponse.startTime) @@ -334,14 +360,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - dialogId, - callsConfigurationId, - applicationId, - entityId, - composedFiles, - callRecordings, - startTime, - endTime); + dialogId, callsConfigurationId, platform, composedFiles, callRecordings, startTime, endTime); } @Override @@ -356,11 +375,8 @@ public String toString() { .append(" callsConfigurationId: ") .append(toIndentedString(callsConfigurationId)) .append(newLine) - .append(" applicationId: ") - .append(toIndentedString(applicationId)) - .append(newLine) - .append(" entityId: ") - .append(toIndentedString(entityId)) + .append(" platform: ") + .append(toIndentedString(platform)) .append(newLine) .append(" composedFiles: ") .append(toIndentedString(composedFiles)) From c3f5218c5b80c81a1fc41fb3f49ae120b1829617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Tue, 31 Mar 2026 15:30:06 +0200 Subject: [PATCH 8/9] Updated release date. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 421f40a..bc46c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to the library will be documented in this file. The format of the file is based on [Keep a Changelog](http://keepachangelog.com/) and this library adheres to [Semantic Versioning](http://semver.org/) as mentioned in [README.md][readme] file. -## [ [6.4.0](https://github.com/infobip/infobip-api-java-client/releases/tag/6.4.0) ] - 2026-03-26 +## [ [6.4.0](https://github.com/infobip/infobip-api-java-client/releases/tag/6.4.0) ] - 2026-03-31 ⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes. All changes, including breaking changes, are addressed and explained in the list bellow. From 59c90b0aeeec247fb74949fb651e137b11a5f3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Vukadinovi=C4=87?= Date: Tue, 31 Mar 2026 16:20:06 +0200 Subject: [PATCH 9/9] Updated CHANGELOG.md --- src/test/java/com/infobip/api/RandomTest.java | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 src/test/java/com/infobip/api/RandomTest.java diff --git a/src/test/java/com/infobip/api/RandomTest.java b/src/test/java/com/infobip/api/RandomTest.java new file mode 100644 index 0000000..45034e0 --- /dev/null +++ b/src/test/java/com/infobip/api/RandomTest.java @@ -0,0 +1,88 @@ +package com.infobip.api; + +import com.infobip.ApiClient; +import com.infobip.ApiKey; +import com.infobip.BaseUrl; +import com.infobip.model.*; +import java.util.List; +import java.util.UUID; +import org.junit.jupiter.api.Test; + +public class RandomTest { + + @Test + public void shouldTest() { + + ApiClient apiClient = ApiClient.forApiKey( + ApiKey.from("7f7320dc0368225ef1dc823bf8e00bad-4838936f-bfd6-458b-8229-2d3723e9d9d1")) + .withBaseUrl(BaseUrl.from("ej69kq.api.infobip.com")) + .build(); + + NumbersApi numbersApi = new NumbersApi(apiClient); + + UUID givenId = UUID.fromString("4d3601ed-c632-4979-ae22-43854ef4ffaf"); + String givenReferenceId = "customer-defined-identifier"; + String givenApplicationId = "app-id"; + String givenEntityId = "entity-id"; + String givenName = "Example Promo"; + String givenNumber = "14232180111"; + UUID givenBrandId = UUID.fromString("a0c63335-f841-4d43-9ef8-e0765a233f29"); + String givenConfirmationMessage = + "Example promotional-marketing. Msg&data rates may apply. Reply HELP for help, STOP to cancel."; + String givenCustomerCarePhone = "14232180111"; + String givenCustomerCareEmail = "examples@example.com"; + String givenExampleMessage = "Come in today and get 10% OFF today!"; + String givenHelpMessage = + "Example promotional-marketing: Help at textsupport@example.com or 18889997777. Msg&data rates may apply. Reply STOP to cancel."; + Boolean givenLowVolume = false; + String givenProgramSummary = "A mix of promotional and informational messaging."; + String givenStopMessage = + "Example promotional-marketing: You have been unsubscribed, no more messages will be sent."; + String givenTermsAndConditionsUrl = "https://www.example.com/terms-and-conditions"; + NumbersTenDlcUseCase givenUseCase1 = NumbersTenDlcUseCase.PROMOTIONAL_MARKETING; + NumbersTenDlcUseCase givenUseCase2 = NumbersTenDlcUseCase.EDUCATION; + String givenOptInCallToAction = + "Text MESSAGE to subscribe to recurring promotional marketing alerts. Msg&DataRates may apply. Text HELP for help, STOP to opt out. Terms and PP https://www.example.om/terms-of-service/"; + String givenOptInKeyword = "MESSAGE"; + Boolean givenAgeGated = true; + Boolean givenDirectLending = false; + Boolean givenEmbeddedLink = true; + Boolean givenEmbeddedPhone = false; + + var request = new NumbersTenDlcCampaign() + .brandId(givenBrandId) + .numbers(new java.util.LinkedHashSet<>(List.of(givenNumber))) + .programSummary(givenProgramSummary) + .confirmationMessage(givenConfirmationMessage) + .exampleMessages(List.of(givenExampleMessage)) + .helpMessage(givenHelpMessage) + .stopMessage(givenStopMessage) + .messageTypes(new java.util.LinkedHashSet<>(List.of(NumbersMessageType.SMS, NumbersMessageType.MMS))) + .termsAndConditionsUrl(givenTermsAndConditionsUrl) + .optIns(new NumbersOptIns() + .keyword(new NumbersKeywordOptIn() + .callToAction(givenOptInCallToAction) + .addKeywordsItem(givenOptInKeyword))) + .ageGated(givenAgeGated) + .customerCarePhone(givenCustomerCarePhone) + .lowVolume(givenLowVolume) + .useCases(new java.util.LinkedHashSet<>(List.of(givenUseCase1, givenUseCase2))) + .directLending(givenDirectLending) + .embeddedLink(givenEmbeddedLink) + .embeddedPhone(givenEmbeddedPhone) + .customerCareEmail(givenCustomerCareEmail); + request.referenceId(givenReferenceId); + request.applicationId(givenApplicationId); + request.entityId(givenEntityId); + request.name(givenName); + + NumbersCampaign resp = null; + try { + resp = numbersApi.createCampaign(request).execute(); + } catch (Exception e) { + System.out.println(e); + } + + System.out.println(resp); + } +}